Sayan Nandan
11a9223e6b
Make MKSNAP return code 3 for `howmany != 0`
...
To streamline the actions we'll make sure that mksnap returns code 3
if an incorrect number of arguments are provided
The actiondoc for the `mksnap` action was added and the contributing
guide was also updated
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan
a3c5135022
Provide `asyncdb` for `dbtest` macro functions
...
In `cli` other errors are now formatted in a `[ERR]` format
Also the documentation across the project was updated
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan
f8fea34e18
Fix tests for snapshots not setting `SnapshotStatus`
...
Also upgrade syn from 1.0.46 to 1.0.48 (#31 )
4 years ago
Sayan Nandan
4ce95c6d42
Make sure that only one snapshot is made at a time
...
`CoreDB` now has a `SnapshotStatus` object for this purpose
This object holds the current state of the service in an `RWLock`
When `mksnap` is called, `SnapEngine` sets `in_progress` to true
When the snapshot is created, `SnapEngine` sets `in_progress` to false
This prevents multiple entities from creating snapshots at the same time
4 years ago
Sayan Nandan
037064e8d9
Improve `Writable` impl for `terrapipe::RespCodes`
4 years ago
Sayan Nandan
6e27bd256f
Exit block if `SnapEngine` failed to initialize
4 years ago
Sayan Nandan
3b3d2c6994
Implement `mksnap` action
4 years ago
Sayan Nandan
c31788754c
Enable module-level imports in `dbtest` proc macro
...
Also, the macro now unpacks the `__private` module into `super`
4 years ago
Sayan Nandan
980d47a3be
Improve `dbtest` macro docs
4 years ago
Sayan Nandan
5d499fa36d
Remove `testsuite` crate and decompose a few tests
4 years ago
Sayan Nandan
425afbe8c7
Fix lower bound for ports in dbtest compiler macro
...
Redundant test objects were also removed
4 years ago
Sayan Nandan
3d1dd04b0d
Improved testing to use custom compiler macros
...
Also, multi-threaded tests were re-enabled
4 years ago
Sayan Nandan
47831252b3
Fix the `dbtest` macro using a `#[test]` attribute
...
Also several misc. fixes were made to the `dbtest` compiler macro
The macro now creates a TcpListener and closes the socket once finished
4 years ago
Sayan
44cb12955d
Fix `tokio` version
4 years ago
Sayan Nandan
147f13a020
Rename `tdb-derive` to `tdb-macros`
...
The proc_macro can now be applied on modules only
All functions within the module will be considered to be a test
This has the advantage of not having to flag every test function
4 years ago
Sayan Nandan
8a8c4450bf
Add outline for `mksnap` action
4 years ago
Sayan Nandan
3ce9ea6eeb
Bump up version
4 years ago
Sayan Nandan
cbe5c5767d
Improve test for `test_pre_existing_snapshots`
4 years ago
Sayan Nandan
945226f3d8
Add tests for existing snapshots
4 years ago
Sayan Nandan
87ef3f3ae2
Enable previous snapshots to be parsed
4 years ago
Sayan Nandan
441676ee13
Improve docs for background services
4 years ago
Sayan Nandan
62fe32f723
Enable automated snapshots
4 years ago
Sayan Nandan
9828c88a4f
Simplify `CoreDB::run_bgsave` to return a `bool`
4 years ago
Sayan Nandan
89ad505a52
Simplify the `BGSave` object by making it an enum
4 years ago
Sayan Nandan
aa4714bded
Enable snapshots to be configured
...
The snapshots section in the config file can now be parsed
4 years ago
Sayan Nandan
b30e71354d
Enable all snapshots to be kept by user preference
...
There can be use cases where the user wants to keep all the snapshots
This commit adds a way to keep all the snapshots, by setting maxtop to 0
When `maxtop` is set to 0, all the snapshots will be kept
4 years ago
Sayan Nandan
98752cf481
Add method to get a deep-clone of the `HashMap`
4 years ago
Sayan Nandan
4c4586c9c1
Re-implement snapshots and add tests
4 years ago
Sayan Nandan
66a447640b
Release read lock immediately
...
This helps us to avoid writer starvation
4 years ago
Sayan Nandan
a527f3c39d
Implement `mksnap` so that snapshots can be made
4 years ago
Sayan Nandan
6ead5ebe6c
Rollout v0.4.4
4 years ago
Sayan Nandan
8e429c17f4
Add basic `Snapshot` object
4 years ago
Sayan Nandan
f9672558d3
Update project metadata and add tests for `KEYLEN`
4 years ago
Sayan Nandan
0a72ea60ed
Add `KEYLEN` query
4 years ago
Sayan Nandan
9e6b455231
Document responses
4 years ago
Sayan Nandan
53f4d00e30
Add tests for `USET`
4 years ago
Sayan Nandan
26a1c4f92d
Add `USET` to actions doc
4 years ago
Sayan Nandan
09a15fd35c
Add `USET` query
4 years ago
Sayan Nandan
e6250ae68a
Rollout v0.4.3
4 years ago
Sayan Nandan
d2284834c7
Add `FLUSHDB` query
4 years ago
Sayan Nandan
31146f9908
Impl `Writable` for `u64` and remove redundancies
4 years ago
Sayan Nandan
f6be0cd781
Bump up version
4 years ago
Sayan Nandan
07195a1d9e
Add `DBSIZE` query
4 years ago
Sayan Nandan
05ed0261ed
Add tests for pipelined queries
4 years ago
Sayan Nandan
a2b25441f1
Add tests for `SDEL`
4 years ago
Sayan Nandan
2d5b40f41f
Add tests for `SSET`
4 years ago
Sayan Nandan
8b881d9dbd
Add tests for `SUPDATE`
4 years ago
Sayan Nandan
20041e41a4
Add `SUPDATE` query
4 years ago
Sayan Nandan
3dbc2bce40
Add `SSET` and `SDEL` for automated doc generation
4 years ago
Sayan Nandan
f6f96c10c2
Add `SDEL` query
4 years ago