aboutsummaryrefslogtreecommitdiffstats
path: root/docs/transaction-algo.org
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-03-05 23:42:15 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-03-05 23:42:15 -0300
commit8c640a262969ef44cd8bc0e0abe95e2a54f4c3f5 (patch)
tree84f9ddd9e41236fb7a6f540aab07e65db9bc93cb /docs/transaction-algo.org
parent295c6a5a1f2b0db9d756ffe7bf413553a0c02737 (diff)
downloadSakura-8c640a262969ef44cd8bc0e0abe95e2a54f4c3f5.tar.gz
Sakura-8c640a262969ef44cd8bc0e0abe95e2a54f4c3f5.zip
ocaml re-migration
Diffstat (limited to '')
-rw-r--r--docs/transaction-algo.org12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/transaction-algo.org b/docs/transaction-algo.org
new file mode 100644
index 0000000..22903ec
--- /dev/null
+++ b/docs/transaction-algo.org
@@ -0,0 +1,12 @@
+* Check if temporary file with the command hash with exists
+To hash the command, we must hash its bytes without the timestamp,
+since it will always vary given it's a transactional time, and add
+instead the commit HEAD of the state of the database.
+
+If such file exists, load the transaction and storage offsets
+alongside the command and attempt to write it as a recovery.
+* Get the transaction offset of the transaction graph file AND storage file
+* Write the offsets to a tmp file
+* Write the command with a flag **flushed** set to false to a tmp file
+* Attempt to execute the command
+* Delete the temporary file