Is the database fully offline during a key-range-based restore?

(Mike Rhodes) #1

In the documentation for fdbrestore, it says:

It is your responsibility to ensure that no clients are accessing the database while it is being restored. During the restore process the database is in an inconsistent state, and writes that happen during the restore process might be partially or completely overwritten by restored data.

Broadly, I read this to mean that you effectively take the database offline to clients during any restore. If you are restoring a given key range, do you still need to prevent clients accessing the whole database, or is preventing read/write of that key range enough?


(Steve Atherton) #2

In short, preventing writes to the key range targeted by the restore is enough to avoid interfering with / corrupting the restore. Preventing reads also makes sense to do, unless for some reason the application doesn’t care about the inconsistency of the ranges it reads.

During a restore, the destination cluster is in a “locked” state. Clients can still execute both read and write transactions against the database if they acknowledge this locked state by setting the LOCK_AWARE transaction option.