-
Notifications
You must be signed in to change notification settings - Fork 48
Conversation
@@ -114,6 +125,8 @@ RocksEngine::RocksEngine(GraphSpaceID spaceId, | |||
db_.reset(db); | |||
partsNum_ = allParts().size(); | |||
LOG(INFO) << "open rocksdb on " << path; | |||
|
|||
backup(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little confused, seems like a run for nothing, could give some comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long story, I can't remember very clear.
- If we don't backup here, we write some data, and storage is stopped before we do a valid backup.
- Mock machine reboot, so rocksdb data in memory is lost. (rocksdb wal is persisted in disk, so we could recover from it in theory)
- Restart the storage, rocks db will be failed to open, log is
While creating a new Db, wal_dir contains existing log file: ...
.
I believe the problem is that if we backup here, it is not nothing here. Something like CURRENT
and MANIFEST
will be backuped. In that way, rocksdb will think the wal is legal.
It involves some rocksdb code, so complicated. Then I try this way and it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. It's a very complicated story.
f12720e
to
3c59a05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job. Well done.
28d9d53
to
0375814
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo,Great job!
I learned a lot from it.👍
To support rocksdb PlainTable and nebula work in memory