-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
World changes do not appear on bluemap. #635
Comments
Check |
Doesn't appear so- here is that output: [19:31:38 INFO]: Maps loaded by BlueMap: |
|
Okay .. and what is (Chunk current hash and last hash are different -> bluemap WILL re-render this map-tile latest with the next server-restart/bluemap reload) |
your render-threads are stopped -> bluemap doesn't render |
Hmm! I don't remember doing that.. odd! Maybe I fatfingered it when testing earlier.. That seemed to fix it! Thanks a ton! |
Okay.. false alarm (maybe).. the structure seemed to appear after we ran For instance, I tried to destroy that structure, and it is still present on bluemap. I ran
The current time is 19:55 - is there a way to check / configure when the render threads will run again? |
BlueMap needs to wait until the server saves the world data to disk, which it detects with File Watchers. The server software (in this case, Paper) decides when to save the world to disk. Maybe those File Watchers aren't working properly? Have you checked BlueMap's debug log file yet? (So not the output in your server console, but BlueMap's own log, which has more detail) You could also try setting the |
If Out of experience from a lot of similar support-discussions: If you just let bluemap and minecraft do it's thing, bluemap will update eventually (as long as its not stopped/frozen). Usually within an hour often a lot less. On normal gameplay -> moving around loading/unloading new chunks, etc.. It's not a real-time map and never will be. |
Thanks for getting back. What you described does makes sense, and I can believe that is how bluemap should ordinarily function, however I have left my server for 8+ hours and have not once seen the map update itself without a manual re-render or server restart. This is consistent across multiple tests, all while moving around, loading / unloading chunks, etc. Out of curiosity, does If it is indeed the latter, than what you described seems to somewhat conflict with the experiment I conducted in my previous post. Bluemap seems to recognize that the block is new, and according to the logs it even schedules an update, but the update never occurs. I am claiming this based on running the
I looked into how paper handles automatic saving. Paper's world config file allows |
Yes that command loads the block from the world-files..
In theory, but there also is some extra IO-caching going on with paper/spigot that might mess with those values. Okay, sorry to be like this,.. but what do you want me to do now? I can't reproduce your issue, it's working fine for me on my own paper server (default values) and seems to work fine for the over 8000 other servers using bluemap too. Your logs and debug commands are fine, and the best i can do right now is explaining to you how bluemap's update system works.. I am glad to explain every detail to you, but a GitHub issue is kinda the wrong place for this. |
I have to admit, this is the first time I've been asked that in a bug report.. I always assumed that was the developer's job 😁 I am running a completely default paper / bluemap install too.. so I provided every detail I could figuring this might be of interest to investigate, but perhaps not. Thanks for your time I suppose. |
I mean .. i am literally out of ideas how i can investigate this further ^^' I am still not convinced this is actually a bug - please excuse me - you wouldn't believe how many times people were claiming their updated were not working and after some investigation it always just turned out to be some cache, frozen-map, stopped bluemap-renders or impatience on the user-end .. mostly a combination of multiple of those.. But alright,.. I'll spin up another fresh paper testserver in a bit and see if i can reproduce your issue somehow 😅 |
I'm definitely open to the possibility that this is impatience on my end- I will admit I am prone to this type of disposition- but feel like I should have definitely been able to observe a normal update by now, and that something is off.. If you do spin up a fresh paper server (I am running 1.21.3), and you cannot reproduce the error- perhaps you could send me the entire server directory so I can test it on my side? That is one potential troubleshooting route. Also, for the sake of scientific consistency, let's make the test simple - placing a single block of dirt on the map and seeing how long it takes to appear on bluemap without any commands or server restarts. I have run the test and am not able to get the block to appear at all. According to the paper docs, it should take no longer than (roughly) 5 minutes, give or take the IO stuff as you said. |
Alright, i gave it a spin, here are my results... First test:I could reproduce the issue you were having. I created the server, joined, went to somewhere outside the spawn-chunks for consistency, let everything run until idle.. made sure the map is up to date.
But: Second Test:
After ~2000 blocks of flying bluemap started rendering the regions i left behind ... including the one i placed the second block in Here is my guess of what is going on:When paper is loading a region-file, it holds the file open for as long as possible -> it writes chunks it unloads to the file, but never "closes"/"releases" the file, until it has a specific amount of region-files open, and then it starts closing the least recently accessed or least recently opened files. This is done to maximize IO-speed for loading/saving chunks. Conclusion:BlueMap's update-system is working fine / as-designed, its just very difficult to cause paper to consistently finalize a region-file change frequently, especially in a test-scenario. The only way to detect changes and render them without waiting for the file-watchers is to make bluemap actively re-scann every single region-file and every chunk-timestamp for changes. Which is happening when bluemap loads, with a |
Thank you very much for the thorough write-up and replication of my environment + issue. This seems to track with what I am observing on my side. I am indeed running a very small server (3-6 players, rarely concurrent, most of them around the spawn point) - so it is conceivable that paper rarely has a need to fully close the file handle on the spawn chunk. I ran a similar experiment at midnight last night, where I placed a new block one chunk away from spawn. It is now 10 hours later, and bluemap still hasn't updated. No players have joined since I placed the blocks. I am a little surprised that paper wouldn't periodically close / reopen the file handle, but I suppose it makes sense given the data is still being written to the file, meaning it is still being backed up in case of a crash. I did a deeper dive on the paper backend. It turns out the term 'flush' means saving the chunk to the region file AND closing the file descriptor/handle, which I had misunderstood. It makes sense that bluemap is able to pick up on changes when I had previously mentioned a paper flag called I am going to try setting Closing thoughtsIn my eyes, this situation is neither paper, nor bluemap's fault. Both are technically working as designed. I would, however, posit that bluemap could likely implement it's own, fairly lightweight, change detection, by checking the hashes of each region file at it's own pace instead of waiting for the file descriptors to close- thereby determining when an update is needed completely on it's own. There would obviously need to be some logic implemented to prevent checks during saves, but I think this might be worth overcoming. The end goal would be an abstracted Perhaps the above idea could be filed in the idea board / roadmap. |
Whats the difference between your suggestion and the existing |
My suggestion would allow bluemap to perform the more granular 'updates' without the need to rely on paper's shoddy and unpredictable file descriptor open/close behavior. |
No, it does a full scan of all region-files/chunks for changes, and only renders the changes -> Simplified: it compares the timestamp of each chunk with the last rendered one and renders only if the timestamp diverges. Fully re-rendering the entire map on each start/every 24h? .. you must be insane ;D |
Okay, but this still relies on the file descriptors/handles being closed, right? In other words, it is still at the mercy of whether paper has decided to flush the changes to disk- which as we've observed is very unpredictable. |
No, the chunk-timestamps are not dependant on the files being closed, they are dependant on the actual data in the files, since they are actual data in the region-files. Each time minecraft writes a chunk to the region-file, it also updates a timestamp for that chunk. Baked into the region-file format. That's the only thing bluemap ever uses to determine if a chunk has changed or not. Hashing the entire files or individual chunks would be too slow. |
Okay, well I clearly need to do a deeper dive into how bluemap handles this. Fair enough. I suppose my suggestion really just boils down to addressing whatever is causing my world to not update for 10+ hours with a completely vanilla paper + bluemap install. Perhaps this is simply changing I'll step off my soapbox 😶 |
Sure! :D .. just .. I spent a ton of time and multiple update-system reworks to think about this exact question. And I can't think of any better way to handle updates than bluemap does right now. And to this time no-one has presented an (in my opinion) better solution to me either. |
I hope it's ok if I'll close this for now :) |
What I did / Steps to reproduce
I simply installed the latest version of BlueMap (bluemap-5.5-paper.jar) on my paper server, restarted, and accessed bluemap using the LAN IP of the server (gaming PC and server are separate machines). I then joined the server, and could see my character moving around on bluemap. As a final test, I built a test structure on my world.
Expected result
I expected the new structure to appear on bluemap.
Actual result
The new structure does not appear on bluemap.
Things I tried:
Context
Bluemap:
[19:05:12 INFO]: Version: 5.5
[19:05:12 INFO]: Commit: 2c63d76
[19:05:12 INFO]: Implementation: paper
[19:05:12 INFO]: Minecraft: 1.21.3
[19:05:12 INFO]: Render-threads: 0
[19:05:12 INFO]: Available processors: 6
[19:05:12 INFO]: Available memory: 10240 MiB
Paper:
Paper version 1.21.3-67-master@d38624b (2024-11-27T20:28:58Z) (Implementing API version 1.21.3-R0.1-SNAPSHOT)
1.0.0-fabric-1.16.1
Plugins
I am not running any plugins other than bluemap.
Other info
Server is running Windows 10 22H2. Map generated organically.
Screenshot showing map discrepancy after 1+ hour and a server restart

I do not use discord, but am more than happy to provide any logs / debugging steps requested of me.
The text was updated successfully, but these errors were encountered: