krareT / pub-task

Terark public developing
MIT License
3 stars 6 forks source link

Distributed RocksDB: Data sync & file lock #30

Open rockeet opened 5 years ago

rockeet commented 5 years ago

There are two kind of readonly readers, syncing-readonly and nonsyncing-readonly.

  1. Writer publish DB changes: wal-log, manifest...
  2. When a readonly node is up
    1. it need to connect to writer node to acquire a snapshot.
      • if writer is not online, ...
      • any way, it needs some mechanism to lock needed files(prevent such files being deleted)
    2. if it is syncing-readonly, it subscribe topics for DB changes
    3. if it is nonsyncing-readonly, it just do read
  3. using ZooKeeper