> If an accidental delete table/row has happened in the state machine -
triggering a snapshot would cause the snapshot to also not have the
table/row.

The snapshot must be taken beforehand such as taking periodic snapshots.

> Basically how can we truncate the raft logs not to an index but from an
index - so that the delete [and all subsequent writes] do not get applied
We may implement it in the StateMachine -- When the StateMachine has
applied the log to a particular index, it can trigger taking a snapshot.
Then, it can be restored to that snapshot.

We might consider adding a feature in Ratis to do it in a more convenient
way.  Something like a recovery startup option.

Tsz-Wo

On Thu, Jul 27, 2023 at 6:25 AM Asad Awadia <[email protected]> wrote:

> If an accidental delete table/row has happened in the state machine -
> triggering a snapshot would cause the snapshot to also not have the
> table/row.
>
> Basically how can we truncate the raft logs not to an index but from an
> index - so that the delete [and all subsequent writes] do not get applied
>
> On Wed, Jul 26, 2023 at 4:43 PM Tsz Wo Sze <[email protected]> wrote:
>
>> Yes, it is possible to do point in time recovery.  We may trigger a
>> server to take a snapshot.  Then, it can restore to that snapshot.  Another
>> way is to configure the server to not to delete the log.  Then, it can
>> replay the log up to a particular index.
>>
>> Tsz-Wo
>>
>> On Wed, Jul 26, 2023 at 9:13 AM Asad Awadia <[email protected]> wrote:
>>
>>> Since raft is conceptually similar to a write ahead log
>>>
>>> Is it possible to do some sort of point in time recovery in case of
>>> accidental deletions and mistakes
>>>
>>> Like restore up to raft index N
>>>
>>> Similar to pitr in postgres?
>>>
>>>

Reply via email to