CoreProtect

CoreProtect

1M Downloads

Issues with rollback-undo-restore

su-fox opened this issue Β· 9 comments

commented

Please help me to understand the problem.

I ask CoreProtect to roll back the actions of specific players within
a 30 block radius, and it instead takes multiple chunks (24 chunks
instead of 30 blocks) and it also rolled back the actions of players I
didn't specify there (via /co i - it shows when I click on a block as
if it was broken a few days ago, but the block is in the same place, I
click on it).

Then I typed /co undo but that didn't help, everything got worse for some reason.

After that I asked to restore it back to the way it was, -
it only returned a fraction of what it did and now I have to manually
look at the logs of every block within a 24 chunk radius and restore them
manually, because even if you select a radius of 1 block, it's like it's
restoring the entire chunk from the sky to the ground.

We are currently using your version 22.2 connected SQLite (Initial DB: 19.3), we switched to it on November
30th, along with the Purpur core upgrade from 1.20.1 to 1.20.2, before
that we had a rather old version of CoreProtect (idk may be ~18?), maybe that's it,
but it would be very sad if we had to purge all the logs for the last 120
days.

There is one more unclear point, what exactly does the /co undo command
do and how to use it correctly? I carefully studied your page
https://docs.coreprotect.net/commands/ looking for details about it, but
I didn't understand why after the first wrong step it didn't undo
everything I did, but made it worse. Maybe I should have specified more
arguments there to make it work correctly or not touch it at all and use
/co restore immediately?

I am not the owner of the server, right now there is no way to check
with him the correct versions of the plugin and kernel that we had
before we moved to 1.20.2, I will ask him a little later if necessary, or he'll contact you here/via discord.

Some screenshots from game with my logs

I've been using your plugin personally for years, never encountered this before, I hope you can find a solution to the problem πŸ™πŸ½

Thank you for your attention and support!

commented

#94 This question helped me with the part about blocks (I've never before rolled such a large area at once over 7 blocks in open space and with the #include parameter, so it was unnoticeable)
It wouldn't be a bad idea if this page in the documentation would also mention chunks regarding radius, as well as this useful information from your quote #94:

You can use r:0x0x0 (x/y/z) to specify a vertical radius.

The only questions that remain are:

    1. Why did it roll back other players as well, if I didn't specify them in the first four commands?
    1. How exactly does /co undo work? Does this command depend on the location where you used it? How can I invert it if it has already changed some locations that I didn't touch before and the game logs don't show it?
    1. How can I revert everything back to my very first command from the screenshot, if I don't have rolled blocks in the logs and they show up as already placed?
commented

Based on your screenshots, this information should clarify most of your questions:

  1. /co rollback is to "undo" changes a player has made in the world. /co restore is to re-do changes they made in the world.
  2. /co undo is just an alias to map the command you previously ran, to either /co rollback or /co restore. For example, if you run "/co rollback Notch", then /co undo will run "/co restore Notch".
  3. a:+block only targets blocks a user has placed in the world. When you ran /co restore a:+block, that will bring back any blocks a specific user has placed, even if they also removed them after. You can use a:block to include both placement and removal.
commented

I just logged into the server to check if there are any more places like this left.

Here are 2 examples where I did not touch the user with any command (link to all commands), but his actions were canceled (you can see in the 1st and 2nd new screenshots), and the logs there show that everything is in order and his actions were not affected.

commented

Ok, thank you for your quick and detailed reply!

I am left with only 2 specific final open questions:

  1. Why did the command affect all users within a 25-30 chunk radius (about six users) if I only specified three, and I always specified at least one, it shouldn't take away globally, right?

  2. Even taking into account that it took about 3 extra users, not so terrible, it can be returned, but logs through /co i show that coreprotect did not touch anything and return accordingly - nothing, nevertheless I was standing on the block on which when you click writes that it is broken, but in fact it stands in place.
    In general there was some kind of mis-synchronisation, because extra users were affected when entering a command for one person and the logs are wrong, writing that only one is affected and "crossing out" his actions, however others are affected too, but their actions are cancelled only in the world, but not in the logs.

I just wanna know how we can fix this?

commented
commented

Can you provide a screenshot showing the inspector output & block you're referencing?

commented

I also forgot to do 1 more screenshot for user AndreyKas044 (sorry, building already fixed manually), - user which I never mentioned in 1-st three commands, but there were a whole tower rollbacked mistakenly, which he broken 15 days ago (acoording his words and by the logs too, when I clicked blocks via /co i, nevertheless we all seen this tower in world like he never broke it, like in these two screenshots sent by me higher), tower just materialised after I rollbacked user Dr_Pix.

commented

The command you ran, /co restore user Dr_Pix action:+block would indeed bring back blocks like in your screenshot.

For those other locations, it’s likely one of the users you restored modified a block at those other locations also, prior to the other users making more recent changes.

commented

Right, it's all clear now, thanks for the support ✨