Archive is not up-to-date

Hi all,

I’ve been testing out the archive functionality and have discovered that it’s not actually generating and up-to-date map for me (it did previously). I’ve tested by importing the exported file into a local world, and I can see that recent updates to the world are not reflected.

I’m using a clean install (~5 days) of MineOS-Node in a virtualized environment. I’m not even sure where to begin troubleshooting this one - anyone else had this problem?

How recent of changes aren’t being reflected? Is the server running during the creation of the archives?

Looks like it’s related to the “-XX:+DisableExplicitGC” flag under additional Java arguments. After I applied it several days ago, that’s when the archives began to get out of sync. I tested this by manually created an archive of /var/games/minecraft/servers/[worldname] , and when I exported it into a single player world on another computer it was out of date by the same amount of time.

Solution was to remove “-XX:+DisableExplicitGC” from the Java arguments. Unfortunately, several days of building was lost! Any ideas how/why this may have happened, or where that data may have gone?

This isn’t likely the cause, by my estimation. Also, that value is a placeholder value (greyed out) and not actually used.

Minecraft chunk data is almost never in sync with what is actually available in game. And more, depending on the playstyles of the players online, can be widely disparate with expectations.

The crux of this is the save-all command (or /save-all ingame). The save-all command tells Minecraft to flush the current contents of the world (what you see ingame) to disk.

Now there are a few catches. For one, save-all saves chunk data (and maybe entities), but not player inventories. Save-all is server-wide and something that is done manually, but otherwise if not done manually save-to-disk operates on an entirely different schedule, namely, when a chunk is unloaded (because no players are in the area–and–the memory is needed for new chunks.

You might immediately think “can this command be run automatically, then?”–yes and no. Minecraft has not programmed a very good API, and as a result, it is difficult to tell when the disk flushing has completed, relative to when one types in (or MineOS types on the user’s behalf) “save-all”. As a result, servers with high activity can actually fail to make archives because the files that are attempted to be archived get changed while Minecraft is flushing it all to disk.

In other words, there’s no systematic way to make sure archives occur precisely after Minecraft completes it’s disk-write.

So it becomes a question of whether it is better to sometimes have no archive/failed creation or to have archives which are out of sync.

The obvious middle ground would be to manually run save-all every few days, but I’ll start thinking up a way that can be more automated than that.

At any rate, I’m pretty sure -XX:+DisableExplicitGC doesn’t really factor into it, and that line doesn’t really do much unless you’re using bukkit–and even then it’s somewhat unrelated to disk-writing.

Thanks for your detailed reply, lots of good things to consider.

I did explicitly declare that flag in the GUI. After removing the flag, my online world instantly reverted to the point before where sync problems were occurring and archives are now accurate (the user count is low on this world, only 1-2 users, so I might not be experiencing the high-usage issues you described above in full force). Perhaps it’s circumstantial? I’d be happy to research further for the communities sake.

I’m running vanilla 1.8.8 so I probably shouldn’t have been using that flag anyways.