tursodatabase/libsql

Recover client from server restarts when handling batons?

Open

#1856 aperta il 29 nov 2024

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)C (490 fork)batch import
enhancementhelp wantedquestionremote protocol

Metriche repository

Star
 (16.744 star)
Metriche merge PR
 (Merge medio 23h 19m) (1 PR mergiata in 30 g)

Descrizione

Currently, I think that when a client holds a server-issued baton and attempts to send it back after a server restart, the request fails with a BatonInvalid error. This error breaks the client's workflow and requires manual intervention.

If this turns out to be the case, let's fix that so thatif a BatonInvalid error occurs and no transaction is in progress, the client should:

  • Automatically restart the stream
  • Obtain a new baton from the server
  • Continue normal operation

Guida contributor