You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/02/23 16:21:32 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on issue #315: Support Watch/Unwatch

PragmaTwice commented on issue #315:
URL: https://github.com/apache/incubator-kvrocks/issues/315#issuecomment-1442063019

   Consider some implemenation methods from scratch:
   
   **by snapshots:**
   It seems to be more "elegant", but is more heavy: make snapshots by each watched key many affect many details in rocksdb.
   And it has some different behavior than redis:
   ```
   set a 1
   watch a
   set a 1
   multi
   get a
   exec
   ```
   Redis will return nil, while the snapshot method will continue to execute this redis txn.
   
   **by command & key tracing:**
   It seems a little complicated but more clean and has more less influence on storage.
   
   I will try the second way these days, but maybe slow since I have lots of other things to do.
   
   @git-hulk @ShooterIT @caipengbo 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org