Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nponeccop opened this issue Aug 8, 2011 · 0 comments

Comments

@nponeccop
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant