question

marek avatar image
marek asked

UpdateSharedGroupData - incorrect limit calculation?

Hi there,

I started getting "Too many keys specified in Data dictionary update. Limit is 10 and request contained 25." whilst hitting UpdateSharedGroupData endpoint. Now, I get the limitations of a free plan but honestly can't explain how your BE arrived at the 25 unique keys calculation based on the below request?

Assuming it calculates main node keys that should be 8, assuming it tallies up children keys it should be about 12. Not 25?!


Can you confirm it's a bug on your end and arrange to fix it? I saw in other posts here advice to move more complex data into fewer keys but as you can see above I'm already doing it.

"Level": "Error",
                "Message": "PlayFab API request error",
                "Data": {
                    "api": "/Server/UpdateSharedGroupData",
                    "request": {
                        "SharedGroupId": "sd-BD38***",
                        "Data": {
                            "gameID": "sd-BD38***",
                            "players": [
                                "19D59***",
                                "E55D3***"
                            ],
                            "status": "JUDGING",
                            "judge": "19D59***",
                            "statusEnd": "2021-01-16T18:40:16.605Z",
                            "availableAnswers": [
                                "Answer 1",
                                "Answer 3",
                                "Answer 7",
                                "Answer 8",
                                "Answer 9",
                                "Answer 11",
                                "Answer 13",
                                "Answer 15",
                                "Answer 16",
                                "Answer 17",
                                "Answer 18",
                                "Answer 20",
                                "Answer 21",
                                "Answer 22",
                                "Answer 23",
                                "Answer 24"
                            ],
                            "playerAnswers": [
                                {
                                    "player": "19D59***",
                                    "answers": [
                                        "Answer 10",
                                        "Answer 2",
                                        "Answer 12",
                                        "Answer 14"
                                    ]
                                },
                                {
                                    "player": "E55D3***",
                                    "answers": [
                                        "Answer 19",
                                        "Answer 4",
                                        "Answer 5",
                                        "Answer 6"
                                    ]
                                }
                            ],
                            "finalAnswers": "[{\"player\":\"E55D3***\",\"answers\":[\"Answer 6\"]}]"
                        }


Cheers,

M

apisShared Group Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

You may refine the data property value in the request and make sure the object value is a string. Please always serialize the value before the update as in the SharedGroupData, it stores string as value.

Surely if you pass through a list of objects, it will be accepted. However, please note that PlayFab will automatically create each member object as a single KVP entry, and it is the reason why your request exceeds the limit. For example, the “playerAnswers” property value is a list, while it will be stored like the way in the attached screenshot:


10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.