It doesn't give you back your Area ID ... #7764
Labels
No Label
1. kind/balancing
1. kind/breaking
1. kind/bug
1. kind/construction
1. kind/documentation
1. kind/enhancement
1. kind/griefing
1. kind/invalid
1. kind/meme
1. kind/node limit
1. kind/other
1. kind/protocol
2. prio/controversial
2. prio/critical
2. prio/elevated
2. prio/good first issue
2. prio/interesting
2. prio/low
3. source/art
3. source/client
3. source/engine
3. source/ingame
3. source/integration
3. source/lag
3. source/license
3. source/mod upstream
3. source/petz
3. source/testserver
3. source/unknown
3. source/website
4. step/approved
4. step/at work
4. step/blocked
4. step/discussion
4. step/help wanted
4. step/needs confirmation
4. step/partially fixed
4. step/QA main
4. step/QA NOK
4. step/QA OK
4. step/question
4. step/ready to deploy
4. step/ready to QA test
4. step/want approval
5. result/cannot reproduce
5. result/duplicate
5. result/fixed
5. result/maybe
5. result/wontfix
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#7764
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
... for a few days now, I've been observing that if you remove your area and then create it again, you don't get the same area ID back, but a higher one. Of course, this can happen if another player also creates an area at the same moment. But I observed this over several days and several times a day with breaks in between. This is no longer a coincidence.
This was intentional change upstream:
ec77a57f42
I guess, for performance reasons?
So we will have "wholes" in the database?
If I undertand the code correctly, it should reuse lower IDs, so after each server restart you'll have a chance to grab lower number IDs...
So I have to wait for a server crash to get my own low ID back? Can't we undo this, the way it worked in YL for four years?
This brings memories of good old ICQ times X)
It's done for performance reasons - iterating over tens of thousands of IDs to find "holes" each time is not cheap...
We could store a separate index of freed IDs but we would need to be careful with the new async thing to not overwrite existing areas somehow (I didn't look at how it works in detail).
Another solution is to add new commands for changing parameters of existing areas, without recreating them - but it may also introduce new problems.
First of all, I exchanged all my five-digit IDs for much lower four-digit IDs. I think the new system carries the risk that you could overload the database with it, but what do I know.
Storing "index" with just one recently freed id might be enough, as then when you remove and immediately recreate area you likely get the same number back
What if you remove more than one area? What if you remove area N1, will you have to iterate again over 10000 of them? It all makes the code awkward...
If we make special cases for this, maybe we should "reserve" area IDs for people who removed those areas, at least until server restart. Each removed area ID will be added to a per-player list, that will be used when new area is created by them? Again, not sure about async stuff...
(and not sure if this is worth making code more complex... I guess it's kinda useful to see how old area is, but it's not reliable anyway...)
With area age possibly being very important when resolving distance rule violations the history may be important. My original base seem to violate 300 nodes distance from city, however my area was first, the city second. I am ok with the city existence, but the area history is important so the city cannot demand removal of my area
Area age is important, but area ID order cannot be used to reliably determine area age.
Previous
areas
code forfindFirstUnusedIndex
just grabbed first unused index, searching for them by counting up from 0 and checking each one. This means that when low-ID area was removed, any newly created area would reuse this ID. New code does the search similarly, but restarts it from 0 after server reboot, not each time area is created.Both in case of old and new code, it's possible for some "old" area to be deleted somewhere (during conflict resolution maybe?), and completely new unrelated area to reuse "old" area ID. This means that no matter how old your area is, both versions of
findFirstUnusedIndex
do nothing to prevent completely new area with even lower ID number appearing near yours. ID ordering should not be used for determining which area is older, when it really matters.What you asking for, sounds more like ability to change some area parameters while preserving it's identity, which is already [partially] possible, but requires admin privs.
We could do crazy stuff like caching a lowest unused index. Once someone protects something we can use async to calculate the next lowest index (through stuff might get out of hand if someone wants to protect, but async hasn't returned the next id)
I agree with whosit, making such a feature is worth the effort... (Better implement ways to edit existing areas)
Area age is stored in a separate meta. I don't like this new change. With 10k area IDs yes, that's a bit to look through, but I doubt this makes any difference before more than 100 areas are involved.
What I do NOT like is the "low number grabbing" to make-believe one has some ancient area status.
I also do not like that when someone removes his own low-id-area that he then only gets a high-id area, but that's a drawback I'm willing to take if necessary.
What feature would solve the problem at hand?
What's the use-case of removing and adding your area back?
We maybe can impletemnt this as a command that keeps the area id.
What commands are we lacking? Change description? Change coords?
Changing coords - in the past, I did area remove and re-add to extend it slightly in one direction
There is move_area, but it's staff only I think.
With
/protect_this
and with the marker posts and stone, incorrect measurements may not be so easy, but they are very easy with the/addowner
. If possible, I do the/area_show
immediately afterwards to discover errors immediately. This did not exist for older areas at that time. For example, I had started to divide the whole city area into landscape areas . There are many practical reasons for this, such as making the harbour an extra part and so on. If someone is supposed to help, you take him to the sub-area and not to the whole city area. Anyway, I made mistakes. I would like to correct them. If possible without staff and that there are five-digit IDs there. One doesn't care, the other doesn't. That's the game.