Commit Graph

306 Commits

Author SHA1 Message Date
Roman Gershman cfaf173236 Allow cache mode - intelligent eviction of less likely to be used items.
This id one by shifting right slots in a stash bucket of the full segment.
In addition, I added eviction related stats to memory and stats section.
I also updated README with the changes. Finally, I added a flag that allows
to disable http-admin console in dragonfly.
2022-05-16 19:39:17 +03:00
Roman Gershman 797c8121b1 Limit table growth according to maxmemory.
1. Make EngineShardSet to be a process singleton instead of a variable passed everywhere.
2. Implement a heuristic of updating free memory per shard.
3. Make sure that SET command returns OOM when a database reaches its limits.
2022-05-16 08:19:32 +03:00
Roman Gershman 6d44d72a56 Add more debugging tools for object introspection 2022-05-15 23:11:45 +03:00
Roman Gershman 038868802f Add caching mode to dragonfly - part 1.
The heart of this feature is ability to bump up entries that has been searched for.
When we bump up an entry withing a dash-table it's moved out of stash buckets or to lower slot ids
within normal buckets. The entry they replace is moved to the place of bumped-up entries.
The next change will be to implement the actual eviction heuristic that will evict keys from the stash buckets.
This will give stash buckets an addition responsibility for caching mode - they will serve as a probation buffer
that holds low-priority or newly added items.
2022-05-15 21:03:56 +03:00
Roman Gershman 6e2e5fcf67 Add support for reordering items within dash table - needed for cache evictions.
1. Simplify versioning scheme. This also reduces metadata space and increases table capacity
   for same memory reservation by ~%5.
2. Fix snapshotting bugs. Recognize duplicate keys during loading.
3. Introduce DEBUG LOAD command to perform manual loading of files.
2022-05-15 14:17:45 +03:00
Roman Gershman 1f953a4ca8 Delete expired items in the background. 2022-05-12 15:52:58 +03:00
Roman Gershman 2b553535b2 Upon full segment try unloading stash buckets back to regular ones 2022-05-12 13:43:03 +03:00
Roman Gershman 4be8c25711 Configure keep-alive for server sockets.
Minor fixes to docker build.
Provide a workaround for #35 that should suffice for the initial release.
2022-05-12 09:13:56 +03:00
Roman Gershman 280ce351a8 Fix CI after moving the repo 2022-05-11 20:37:25 +03:00
Roman Gershman 3dce1d33fc Update README.md. Disable alpine docker for now.
Update organization references across the docs.
2022-05-11 12:49:19 +03:00
Roman Gershman 1aa2a171ac Stats and debugging improvements. Provide some keyspace stats 2022-05-11 09:57:47 +03:00
Roman Gershman e9dda3aa64 Implement zinterstore 2022-05-10 21:48:24 +03:00
Roman Gershman 53fb11b2fd Tiered storage code cleanups 2022-05-10 20:15:03 +03:00
Roman Gershman 0c5e2a5ecd Implement CLIENT LIST and CLIENT SETNAME. 2022-05-10 06:35:37 +03:00
Roman Gershman 9e0c705d16 More work on tiered storage.
1. Set min block size back to 4k.
2. Free external entities that are being overriden.
3. Fix accounting stats.
4. Support entities batching.
2022-05-09 07:39:25 +03:00
Roman Gershman c34e7c6d44 Implement ZUNIONSTORE.
Fix some bugs in transactional framework to support irregular commands.
Lay out groundwork for supporting XXX-STORE other commands in zsets.
2022-05-07 20:38:18 +03:00
Roman Gershman 3a4c36c1f2 Refactor code in tiered storage 2022-05-06 13:36:09 +03:00
Roman Gershman 2d6251ca83 Add circleci config.yml 2022-05-05 13:38:22 +03:00
Roman Gershman 5568205b34 More work on tiered storage.
1. Reads from external storage support now o_direct mode.
2. Simplify write unloading logic. Make pending buffer a ring buffer with
   a predefined capacity.
3. Add more tiered stats to info command
2022-05-05 12:05:05 +03:00
Roman Gershman 7f06e223f7 Statically link boost into dragonfly 2022-05-04 15:55:03 +03:00
Roman Gershman b6ed08edb7 Fix a typo 2022-05-03 11:58:09 +03:00
Roman Gershman 5c191e31d4 Prepare transactional code to cope with irregular multi-key commands like ZUNIONSTORE 2022-05-01 22:23:19 +03:00
Roman Gershman b1f993377b Add update hooks to zset and hset families 2022-04-30 22:56:44 +03:00
Roman Gershman 370d4cd0ee support lua scripts loading 2022-04-30 22:21:05 +03:00
Roman Gershman 5c9cee171c Add SCRIPT EXISTS subcommand 2022-04-30 16:58:36 +03:00
Roman Gershman 0582c5750a Add misssing update hooks for list family 2022-04-29 20:48:25 +03:00
Roman Gershman 362f1f4ec4 Integrate UpdateHooks into set-family code 2022-04-29 19:54:41 +03:00
Roman Gershman f65d6308c7 Some small refactorings around DbSlice::AddOrFind.
Code clean-ups in string-family in preparation for the work on
point in time snapshotting for other types.
2022-04-29 17:47:12 +03:00
Roman Gershman afd52d5571 Clean-ups in transaction code. 2022-04-29 15:50:20 +03:00
Roman Gershman 2966d04743 Allow external allocations for sizes greater than 1MB 2022-04-29 09:38:01 +03:00
Roman Gershman 0daa221ff5 Add extent tree for later usage in the external allocator 2022-04-29 07:16:32 +03:00
Roman Gershman 1481cb9d57 Finish RPOPLPUSH 2022-04-28 20:16:56 +03:00
Roman Gershman b36c16b314 Implement single shard use-case for rpoplpush. Some BLPOP related refactoring 2022-04-28 19:05:51 +03:00
Roman Gershman d3764efbca Add CONFIG RESETSTAT command. Start working on RPOPLPUSH 2022-04-27 23:50:03 +03:00
Roman Gershman 72e90bb729 More work on blocking commands like BLPOP.
Fixes #1 and fixes #24.
2022-04-27 10:42:35 +03:00
Roman Gershman 344731d255 Bug fixes.
1. Fixes #26
2. Fixes #28
2022-04-25 19:08:21 +03:00
Roman Gershman d3d30fbbaf Add RenameNx. Fix #30 2022-04-25 15:41:41 +03:00
Roman Gershman 8ae7436a22 Reverse range for reverse z-commands. Fixes #27 2022-04-25 15:38:29 +03:00
Roman Gershman 69c8658be4 Fix handling on non-float values in INCRBYFLOAT. Fixes #22 2022-04-25 12:07:50 +03:00
Roman Gershman 2c8cb23098 Few improvements.
1. Docker build now builds for arm64 as well.
2. Add bind option to specify on which interface the server should listen.
3. Automatically deduce maxmemory setting.
2022-04-25 12:06:31 +03:00
Roman Gershman d64a0c6f0e Add ZSCAN command 2022-04-25 00:14:40 +03:00
Roman Gershman b50428d1a6 More work on tiered storage.
1. External allocator now allocates blocks that are multiples of 8KB and are aligned to 8KB.
   This allows to use it with O_DIRECT files. 4KB was enough but since we can group small strings within
   a single block anyway, we can increase minimal block sizes.
2. Fix constants dependencies within external allocator. Improve code structure.
3. Limit string offloading to string sizes below 2MB. Currently we do not support external allocations of larger sizes.
2022-04-23 22:03:12 +03:00
Roman Gershman a9ada45b10 Limit the maximum number of active in-flight write requests 2022-04-22 21:13:27 +03:00
Roman Gershman 8d312a92e1 Add tiered storage stats 2022-04-22 18:07:35 +03:00
Roman Gershman ec64f4e9e1 Simplify testing framework. Run(...) now returns RespExpr instead of vector of RespExpr 2022-04-22 10:31:51 +03:00
Roman Gershman f1c5e4d702 Remove redundant redis files 2022-04-22 00:07:31 +03:00
Roman Gershman 7b9bad35e9 Support external storage for GET requests 2022-04-21 23:37:53 +03:00
Roman Gershman dce0ce3d69 Add COMMAND COUNT option 2022-04-21 23:26:29 +03:00
Roman Gershman 69911a95ac Add ZREMRANGEBYLEX and ZREVRANGEBYSCORE commands. 2022-04-20 23:51:48 +03:00
Roman Gershman d8697463dc Adding ZLEXCOUNT and ZRANGEBYLEX commands. 2022-04-20 21:50:29 +03:00