felixge / felixge/node-dirty

aux field in addition to key and val to aid manual diagnostics and rollbacks

Abierto
#23 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
619
Forks
64
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Currently dirty stores 2 fields in its database files: key and value. I propose to add third "aux" field and change db.set() to accept third optional argument. The aux field will be written to the file along with data, but will not be read to memory.

Rationale:

Dirty is a very useful database because it preserves complete transaction history. E.g. if I have a bug and my software deletes all user accounts, I still can recover from this problem by deleting a few last lines from the database log and thus rolling the database back.

To make such rollback easier it would be nice to have a timestamp along with the data, so if I know that a bug was introduced yesterday, I can easily rollback all transactions since yesterday. However, such diagnostic data is not limited by time stamps: one could log user name, user ip or any other information he recognizes as helpful to fight vulnerabilities, fraud and bugs.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.