Update tournament metadata without deleting tournament

Hello,
I’d like to update the tournament metadata.
My only solution right now is to delete it and re-create it, but I will lose all the current user tournament records.
Is there a possibility to update tournament metadata on the fly?
Thank you

The tournament metadata cannot be changed after creation, as the server caches this data for efficency measures.
Could you please elaborate on what’s your use-case? We may consider adding a new API to update the metadata in the future if it proves useful.

Hope this helps.

Hello @sesposito ! I assume the case when a game designer decided to change a schedule or some conditions stored in the metadata of the existing tournament (weather, rewards to show on a client, targets, UUID of this iteration of the tournament than can be helpful with migration from our old server to Nakama etc.). Or a game designer decided that a tournament without an end time should be not played after a fixed date (so we need to change the endData of a tournament). If to talk about the metadata and similar properties - we can store them into a different collection, but we can’t do the same with the properties like resetSchedule and durarion. Can we change the resetSchedule or the duration property of an existing tournament without losing its expired records? Also I can’t find the answer for the question: how long expired records exist? Will they cleaned or will they stored all the time until the tournament will be deleted? What is the best way to display the final table of the finished tournament for the users, that were offilne when the tournament finished and then restarted? If the tournament wasn’t changed - we can read expired records, but if we needed to change a metadata or a tournament schedule - these records will be lost. Thanks in advice.

PS I’ve read that it is a wrong approach to change parameters of a runnning tournament, but I have no an optimal solution for the case when we need to change a schedule of a running tournament without the endDate. We only can delete this tournament and run another one (but if we would do that - do we need to save the records of the tournament before deletion)? Or can we run new one tournament and leave the old tournament running for some time while we need its records, and than delete it?

Hello @Andrey,

Currently, the properties of a tournament cannot be changed, they are immutable. If needs be, a new tournament should be created with the new properties.

A tournament’s records are never deleted, unless the tournament itself is deleted. The records submitted from a previous expiration can be retrieved using the expiry_time param to fetch those records.

1 Like

Is it possible to stop a tournament without an endDate without deleting it? If we delete it to replace by another one, its records will be lost. Are there any best practices when we need to delete a tournament (to stop it) but also we need its records in the future?

My suggestion would be to:

  1. Create a new tournament with the new config params but continue reading from the old one.
  2. For writes, use a custom RPC that can decide to which tournament it should write to, perhaps using a storage object that stores whether the old tournament has ended yet (or if it should end earlier than its configured time).
  3. If the REST API is used, a before hook on tournament writes could also use this storage object to know whether the write should go through or not.
  4. Use the tournament end hook on the old tournament to write any records that need to be migrated over to the new tournament and set this storage object state accordingly.
1 Like