After rolling back using `btrfs-assistant -r 1`, `db.lck` appear

I installed the btrfs file system on my newly installed arch linux and used snapper for automatic snapshots.

After I used sudo pacman -S niri kitty, I decided to try the rollback function, then I executed btrfs-assistant -r 1

After using reboot to restart, I tried sudo pacman -S niri kitty again, but a error occurred.

error: could not lock database: File exists

Regarding this issue, I see:

  1. “Pacman is currently in use, please wait…” After restoring BTRFS snapshot – Issues & Assistance – CachyOS Forum
  2. Hoping someone can help me understand this pacman db.lck issue – General system / Pacman & AUR helpers – EndeavourOS

But they are all just saying one sentence

yeah it is normal

But, why?

If a snapshot is created while pacman is running, how exactly is it done? Is another process started to take the snapshot while pacman is running? Or is pacman paused and then the snapshot is taken? If it’s the former, wouldn’t there be a problem with the snapshot being too late? If it’s the latter, why not just stop pacman, then take the snapshot, and then restart the same pacman afterward?

I need to know what process he actually used and when the snapshot was taken, so that I can determine whether he took the snapshot at the appropriate time.

Can someone answer this why? for me?
Or should I disable pacman‘s automatic snapshots?