Sign In Register

How can we help you today?

Start a new topic
Answered

Clearing leaderboard data from Mongo and dropping old tables

Question in title.


1. First, I would like to delete a removed leaderboard's backing database collection. As it stands the leaderboard has been removed so it does not have a correlating short code, but when viewing the data in the NoSQL explorer, the backing collection is very much there.


Please note that I have reviewed the following questions (marked as answered), and they are simply wrong.


https://support.gamesparks.net/support/discussions/topics/1000065095

-> As per YOUR documentation. the drop() method should not delete the collection, but rather remove all data from backing collection returning it to pristine condition. (from the docs: Deletes the underlying data for this leaderboard, making it like new.)


https://support.gamesparks.net/support/discussions/topics/1000041822

-> It is NOT possible to drop system collections or leaderboard collections using the NoSQL explorer, as they are removed from the collection dropdown list when switching to the DROP operation tab.


I would appreciate a coherent response on how to handle this.


2. Trying to remove all data from a different leaderboard and so far I've been unsuccessful. As mentioned above, I tried calling drop() on the leaderboard object from Cloud Code, but it doesn't seem to have any effect. When I view the collection data in the NoSQL explorer, everything is there and unchanged.


And again, same as with the DROP operation, leaderboard collections are also exluded from the REMOVE operation, meaning I can't manually nuke the data.


Again, would appreciate any information on how to achieve this.


Thanks,

Martin


Best Answer

Hi Martin,


The first topic you linked to isn't wrong, it just doesn't work for you in your current situation. As you have deleted the Leaderboard from the game configuration before dropping it and its underlying running total data in Cloud Code or from the Manage Screen you have been left with some left over data. The Cloud Code in that thread still works fine, I've just tested it myself and can confirm this is the case, as the Leaderboard in your game has been removed the shortCode is no longer valid so the Drop method in Cloud Code won't work. My answer in the second topic was in relation to the most recent query. I agree it can be slightly misleading reading back over the topic as a whole so I will edit my final response to clarify what does and doesn't work using the Drop Tab. Can you let me know the names of the Leaderboards in this state in your game and I'll take a closer look for you. Also if you can let me know the event you are using to try and drop the leaderboards that would also be helpful.


Thanks,

Liam


Answer

Hi Martin,


The first topic you linked to isn't wrong, it just doesn't work for you in your current situation. As you have deleted the Leaderboard from the game configuration before dropping it and its underlying running total data in Cloud Code or from the Manage Screen you have been left with some left over data. The Cloud Code in that thread still works fine, I've just tested it myself and can confirm this is the case, as the Leaderboard in your game has been removed the shortCode is no longer valid so the Drop method in Cloud Code won't work. My answer in the second topic was in relation to the most recent query. I agree it can be slightly misleading reading back over the topic as a whole so I will edit my final response to clarify what does and doesn't work using the Drop Tab. Can you let me know the names of the Leaderboards in this state in your game and I'll take a closer look for you. Also if you can let me know the event you are using to try and drop the leaderboards that would also be helpful.


Thanks,

Liam

Hi Martin,


Just to add to this, if you have a Multi Stage Publishing setup in place like the one in our guide here, all of your collections will be cleared when copying a snapshot from one stage to another, left over collection data from an already deleted leaderboard (like the one you currently have) will also be removed and not visible the NoSql explorer. I hope that helps. I've also edited the other forum post to clarify it. If you have any further questions just let me know.


Thanks

Liam

Login to post a comment