Conversation
c1f83cd to
0bf47a9
Compare
0bf47a9 to
40b0bc2
Compare
| auto cfd = cfh->cfd(); | ||
| auto sv = cfd->GetReferencedSuperVersion(this); | ||
| auto sv = cfd->GetSuperVersion(); | ||
| sv->Ref(); |
There was a problem hiding this comment.
Not sure what the difference is here could you give me some context?
There was a problem hiding this comment.
They are equivalent, but GetReferencedSuperVersion() is meant to (and optimized to) be called outside of the lock. By adding a mutex to GetSuperSnapshots() (oops) it caused a deadlock :)
There was a problem hiding this comment.
It's using quite an interesting technique:
rocksdb-cloud/db/column_family.cc
Lines 1260 to 1277 in 43810fe
There was a problem hiding this comment.
Will have to read more outside the function but definitely interesting. Not quite clear to me how thread local super versions get cleaned after a swap since local_sv becomes obsolete (dump thread does it? but then wouldn't that mess up the currently used sv for the thread?)
No description provided.