Commit Graph

941 Commits

Author SHA1 Message Date
Kelvin Mwinuka
d31cb10b51 Obtain a read lock on connection info before logging command. 2024-07-01 06:37:23 +08:00
Kelvin Mwinuka
a102f90bc0 Removed redeclared keyspace functions 2024-07-01 06:37:23 +08:00
Kelvin Mwinuka
646f5bed25 Re-implemented snapshot.go logic to persist and restore multi-database state 2024-07-01 06:37:23 +08:00
Kelvin Mwinuka
a5cfdfd5ee Added multi-database support for loggin and restoring in log engine.
Added multi-database support for preamble snapshots and restoration in preamble engine.
Added multi-database support for aof engine.
Removed buffered channel from log and aof engines. Command logging is now synchronous.
Added multi-database support for the raft layer's data replication.
2024-07-01 06:37:23 +08:00
Kelvin Mwinuka
dcba5796cb Implemented test for SWAPDB command. 2024-07-01 06:37:21 +08:00
Kelvin Mwinuka
f14de2d9ff Implemented tests for FLUSHDB and FLUSHALL commands 2024-07-01 06:37:07 +08:00
Kelvin Mwinuka
2223d00d85 Implemented FLUSHDB and FLUSHALL command to clear logical databases. 2024-07-01 06:37:07 +08:00
Kelvin Mwinuka
081b4c7ae9 Disabled adjustMemory memory until a multi-database implementation is done. Updated function signatures in handler params for built-in commands and for modules. Disabled snapshots and snapshot restoration until a multi-database implementation is done. 2024-07-01 06:37:07 +08:00
Sahil
db42cf6ed8 added test for RENAME command 2024-07-01 06:37:06 +08:00
Sahil
60bfd8011f added tests 2024-07-01 06:35:24 +08:00
Sahil
03f278c9a0 feat: added DECRBY command
Rebased with main branch.
2024-07-01 06:33:35 +08:00
Sahil
3c338cf7f0 feat: added DECRBY command 2024-07-01 06:27:12 +08:00
Sahil
7bd98e6b00 feat: added DECR command support 2024-07-01 06:22:07 +08:00
Kelvin Clement Mwinuka
dcc1b4b3fc Updated coverage report 2024-07-01 06:18:40 +08:00
Kelvin Clement Mwinuka
8b8c235871 Implemented test for INCR embedded API.
Added test cases for incorrect commands length for INCR command.
Fixed error checking on INCR commands test. RESP errors will be contained in the response object of the ReadValue method. The error object only contains an error when ReadValue failes.
2024-07-01 06:18:21 +08:00
Sahil
3b70bb2b48 feat: INCR command added 2024-07-01 06:13:05 +08:00
Kelvin Mwinuka
8ecb9ab54f Restore multi-database state in FSM in the raft layer 2024-07-01 06:06:51 +08:00
Kelvin Mwinuka
59143b4cd5 Added multi-database support for loggin and restoring in log engine.
Added multi-database support for preamble snapshots and restoration in preamble engine.
Added multi-database support for aof engine.
Removed buffered channel from log and aof engines. Command logging is now synchronous.
Added multi-database support for the raft layer's data replication.
2024-07-01 06:06:26 +08:00
Kelvin Mwinuka
182195ebc3 Added multi-database support to snapshot module 2024-07-01 06:05:46 +08:00
Kelvin Mwinuka
56f0a5ce61 Implemented test for SelectDB and SetProtocol methods 2024-07-01 06:05:46 +08:00
Kelvin Mwinuka
f867bca8e4 Implemented test for SWAPDB command. 2024-07-01 06:05:44 +08:00
Kelvin Mwinuka
ed6a5718f6 Implemented tests for FLUSHDB and FLUSHALL commands 2024-07-01 06:05:32 +08:00
Kelvin Mwinuka
850cb7c5eb Added check for readKeys and writeKeys length before checking for authorization in acl module. Added tests for HELLO and SELECT client-server commands 2024-07-01 06:05:19 +08:00
Kelvin Mwinuka
4dd3aa40b2 quit 2024-07-01 06:05:19 +08:00
Kelvin Mwinuka
0bb4ce6756 Added emebedded API methods to change Protocol and logical DB. Added comments to SwapDBs and Flush methods. 2024-07-01 06:05:19 +08:00
Kelvin Mwinuka
1a8d2314cd Implemented FLUSHDB and FLUSHALL command to clear logical databases. 2024-07-01 06:05:17 +08:00
Kelvin Mwinuka
9e4b61fce7 Implemented SWAPDB command handler. 2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
dc9b33bc15 Added ability to set the connection's database in SetConnectionInfo function. Implemented SELECT command to allow TCP connections to select a different database. 2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
21aabda04d Moved AUTH command from the acl module to the connection module. Added echo command to the list of commands that are skipped on ACL authorization. 2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
93a165e9f9 Added support for HELLO command.
Load modules build from Dockerfile.dev into instances from docker-compose.yml.
Fixed user loading from config file in ACL module.
2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
ddea7ab127 Added tracking for embedded client connection info. Moved logic to determine which connection info to use into the handleCommand function. 2024-07-01 06:05:07 +08:00
Kelvin Clement Mwinuka
c4b42854b1 Initialise volatile key tracker on startup. Create a database if it does not exist when trying to set a value. 2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
1d9ba10e46 Fixed typo in keyspace.go 2024-07-01 06:05:07 +08:00
Kelvin Mwinuka
325157ab71 Disabled adjustMemory memory until a multi-database implementation is done. Updated function signatures in handler params for built-in commands and for modules. Disabled snapshots and snapshot restoration until a multi-database implementation is done. 2024-07-01 06:05:05 +08:00
Kelvin Mwinuka
295ef9dd52 Added multi-database support in updateKeysInCache method 2024-07-01 06:04:31 +08:00
Kelvin Mwinuka
663c097be8 Added support for multiple databases on the evictKeysWithExpiredTTL function 2024-07-01 06:04:31 +08:00
Kelvin Mwinuka
33d7eb2f6e Caches and volatile key tracking slices for each database. 2024-07-01 06:04:31 +08:00
Kelvin Mwinuka
d6162b23f6 Added database support for keyspace methods. Commented cache methods and standalone persistence initialisation until their implementations support databases as well. 2024-07-01 06:04:31 +08:00
Kelvin Clement Mwinuka
9745270b40 Added placeholders for adding protocol and database version in raft replication flow 2024-07-01 06:04:31 +08:00
Kelvin Mwinuka
d7bcc3a4fc Merge pull request #81 from dotslashbit/issue-58
feat: Added RENAME command
2024-06-25 22:43:10 +08:00
Kelvin Mwinuka
9b897b472f Added wrong args tests for RENAME command. 2024-06-25 22:39:46 +08:00
Sahil
26959200ed added test for RENAME command 2024-06-25 18:56:00 +05:30
Sahil
38ca643d05 feat: added RENAME command 2024-06-25 18:23:54 +05:30
Kelvin Mwinuka
67ea63193b Merge pull request #79 from dotslashbit/issue-64
feat: added DECRBY command support
2024-06-25 14:42:48 +08:00
Kelvin Mwinuka
70a1536482 Removed duplicate test for INCRBY command 2024-06-25 14:31:28 +08:00
Kelvin Mwinuka
591cc7ef99 Merge branch 'main' into issue-64 2024-06-25 14:30:14 +08:00
Kelvin Mwinuka
ed28ffca80 Updated INCRBy command handler 2024-06-25 14:25:17 +08:00
Kelvin Mwinuka
9e49c35116 Added command length tests for DECRBY command. Updated godoc comment for DecrBy embedded API method. 2024-06-25 14:19:32 +08:00
Sahil
51100a1700 added coverage report 2024-06-25 14:19:32 +08:00
Sahil
5f9c9a0e7d feat: added DECRBY command
Rebased with main branch.
2024-06-25 14:19:30 +08:00