-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
let (key, (value, rc)) = i; | ||
if rc > 0 { | ||
assert!(rc == 1); | ||
batch.put(self.column, &key, &value).expect("Low-level database error. Some issue with your hard disk?"); |
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.
not sending this out through UtilError
?
} | ||
if rc < 0 { | ||
assert!(rc == -1); | ||
if try!(self.backing.get(self.column, &key)).is_none() { |
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.
these checks probably will slow down inject quite a bit and it's not as though these are going to cause rocksdb errors. are they even worthwhile?
seems like we are using the DB to point out logic errors in the rest of our code.
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.
yup - this way it fails fast rather than allows an inconsistent situation to persevere.
however, we might consider a build flag (perhaps called "final"?) which allows these checks to be omitted.
More generic approach to assist snapshot restoration.