245 Commits (4dcb203359f5da844d9a0056d1ba0674f766d071)

Author SHA1 Message Date
Sayan Nandan 71e020db59
Ensure that duration values are not zero
If the duration for a periodic operation is set to zero in the
config file then it is likely that the thread would crash.
We want to prevent this at all costs, which is why
we're adding this check.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 0ea02f846a
Add tests for MKSNAP and bump up version
We don't need tests for MKSNAP when it is enabled as we already have
tests for snapshotting in `diskstore::snapshot`

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
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
Sayan Nandan 01f43bcd88
Add `SSET` to `queryengine`
The `SSET` tag was added under tags and matched against
4 years ago
Sayan Nandan c9aa602542
Add `SSET` query 4 years ago
Sayan Nandan adb4e4b9f6
Add `strong` module 4 years ago
Sayan Nandan 1488a7786b
Add information on the Cyan Snapstore format
Also, `CyanSWF` was renamed to `CyanSFW` for consistency
4 years ago
Sayan Nandan b96a7831a2
Add `CyanSWF`, the streaming file writer object 4 years ago
Sayan Nandan ed6e990572
Fix incorrect versions
A mass rename was done in 1ac8dd8
This action incorrectly replaced versions in deps
This commit reverts the changes made to the dependency versions
4 years ago
Sayan Nandan 1ac8dd896a
Rollout v0.4.2 4 years ago
Sayan Nandan b2a5237191
Bump up version 4 years ago
Sayan Nandan a0ccf059de
Make `every` and `enabled` keys in bgsave optional
If there is no `enabled` key, then assume that BGSAVE is enabled
If there is an `every` and no `enabled`, assume that BGSAVE is enabled
4 years ago
Sayan Nandan 74c9d62fe0
Update docs for the `bgsave_scheduler` 4 years ago
Sayan Nandan 511e227f81
Enable BGSAVE to be configured via config file 4 years ago
Sayan Nandan 3a84feb14e
Cleanup to use `BGSave` as a configuration object
Also a test for a config file with a custom BGSAVE has been added
4 years ago
Sayan Nandan f2f0d2d4bd
Enable bgsave config to be read from the cfg file
Now, the `bgsave` key can be read and parsed from the config file
4 years ago
Sayan Nandan 20d0b3bf1f
Revert to using vector based tests
A custom testing macro would be made in the future.
For now, we will use the `QueryVec` based test to test the queries
4 years ago
Sayan Nandan b3500ee3b9
Use jemalloc for non-MSVC targets 4 years ago
Sayan Nandan d366f887a9
Close transport once every test is over 4 years ago
Sayan Nandan d1a04bdf23
Manually drop server in tests 4 years ago
Sayan Nandan 7dcf8b92d7
Enable tests for all queries 4 years ago
Sayan Nandan 3ad2d573a0
Add tests for mupdate 4 years ago
Sayan Nandan 7574e4bc58
Add tests for exists 4 years ago
Sayan Nandan ffaa1a563b
Add tests for mset 4 years ago
Sayan Nandan 42a8d145a1
Fix mset and mupdate not detecting an action error 4 years ago
Sayan Nandan f8a1980898
Add tests for mget 4 years ago
Sayan Nandan d8c385bf2d
Add tests for del 4 years ago
Sayan Nandan ea8d9d2108
Add syntax error tests for get, set and update 4 years ago
Sayan Nandan cab2ce733b
Add tests for heya, get, set and update queries 4 years ago
Sayan Nandan 096a0c901b
Remove unused functions and duplicates
`proc_query` is used by both by `tdb-bench` and `tsh` so it was moved.
Also, the `println`s in the query tests were moved into the macros
4 years ago
Sayan Nandan 9064c0aca3
Enable tests for `get`, `mget` and `heya` 4 years ago
Sayan aeb5899050
Fix test in `server::config`
We're checking from a TOML `String` and not from a location
4 years ago
Sayan Nandan 59a2b42615
Implement logging 4 years ago
Sayan Nandan 432e19dd71
Make docker build use `latest` tag 4 years ago
Sayan Nandan fc274ff95f
Improve docs in server 4 years ago
Sayan Nandan 40fea56801
Make some `fn`s `const` 4 years ago
Sayan Nandan fb38acd392
Implement BGSAVE 4 years ago
Sayan ae5da090ec
Don't ignore `heya` test 4 years ago
Sayan Nandan 85662e1f83
Enable tsh to connect to different ports 4 years ago
Sayan Nandan f69bef7308
Improve terminal output and bump up version
We will show a syntax error when we get an invalid config file.
4 years ago
Sayan Nandan c26a319877
Bump up version 4 years ago
Sayan Nandan b06dedc8bd
Enable configuration files to be used 4 years ago
Sayan Nandan 340eaaebcb
Add support for IPv6 addressing 4 years ago
Sayan Nandan 914b1f06e3
Added port, host and noart options in config file 4 years ago
Sayan Nandan 86d15120e4
Add methods to parse cli arguments 4 years ago
Sayan Nandan 0690be4d4e
Add module to handle configuration files 4 years ago
Sayan Nandan 308e57c846
Add `BuiltJSON` and `JSONBlob` objs to build JSON 4 years ago
Sayan Nandan 3163b6a0e8
Add outline for `jget` 4 years ago
Sayan Nandan 6ad417e7ce
Bump up version to 0.4.0 4 years ago
Sayan Nandan e23cd5ffcd
Update version and labels 4 years ago
Sayan Nandan 00730ee9d4
Fix wrong length in pre-compiled responses
Length of "Unknown action" should be 14 and not 15
4 years ago