HWCloudEngine / storage-gateway

storage gateway to adapt cloud storage to replicate/snapshot/backup to other different cloud storage.
7 stars 10 forks source link

remote sg client how to replay journal #27

Open dsnlevi opened 7 years ago

dsnlevi commented 7 years ago

remote sg client replay journal differ from local sg client replay journal.

solution:

  1. use cache recover from replicate journal and add to cache, how to keep sequence

  2. replayer just direct read from replicated journal file

dsnlevi commented 7 years ago
  1. normal scenario: slave read entry from replicated file, and write to block device slave is read only

  2. failover scenario: slave receive failover command from control slave continue replay replicated file which remained, slave only read after exhaust all replicated file, slave switch to read and write

  3. slave crash and restart take cache recover

dsnlevi commented 7 years ago

todo:

  1. GetJournalMarker interface should define more clean

  2. VolumeStatus should contain 4 dimension, volume status pull from dr server volume status from sg control(add, attach, delete) master/slave replication enable/disable/failover rw/ro

  3. slave replayer should use replication uuid to local which journal file will be replayed