You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the function Status VersionSet::Recover(bool* save_manifest), the statement manifest_file_number_ = next_file; could potentially lead to a scenario where the identifier of the manifest file matches that of the log file for the memtable. The chronological sequence of events that might give rise to this situation is outlined as follows:
Memtable Writing: The memtable is actively being written to (with the log file at ID 4 and next_file_num set to 5), while the immutable memtable (imm) is empty.
Compaction Occurs: A compaction process consolidates SST files, and within the edit log, next_file_number_ is recorded as 5.
Memtable Switch: The memtable becomes full, triggering a switch to a new log file (now at ID 5, with next_file_num advanced to 6), and the filled memtable is moved to the imm state.
Database Restart: The database undergoes a restart.
Recovery Process: During VersionSet::Recover(), the edit log with next_file_number_ as 5 is read, prompting the creation and redoing of the manifest file using the ID 5.
Overlap Identified: Consequently, both the manifest file and the log file now share the same identifier, which is 5.
While this overlap in identifiers does not impede the functional operation of the database, I seek confirmation on whether this particular sequence of events is plausible. Thank you for your attention to this matter.
The text was updated successfully, but these errors were encountered:
In the function Status VersionSet::Recover(bool* save_manifest), the statement manifest_file_number_ = next_file; could potentially lead to a scenario where the identifier of the manifest file matches that of the log file for the memtable. The chronological sequence of events that might give rise to this situation is outlined as follows:
Memtable Writing: The memtable is actively being written to (with the log file at ID 4 and next_file_num set to 5), while the immutable memtable (imm) is empty.
Compaction Occurs: A compaction process consolidates SST files, and within the edit log, next_file_number_ is recorded as 5.
Memtable Switch: The memtable becomes full, triggering a switch to a new log file (now at ID 5, with next_file_num advanced to 6), and the filled memtable is moved to the imm state.
Database Restart: The database undergoes a restart.
Recovery Process: During VersionSet::Recover(), the edit log with next_file_number_ as 5 is read, prompting the creation and redoing of the manifest file using the ID 5.
Overlap Identified: Consequently, both the manifest file and the log file now share the same identifier, which is 5.
While this overlap in identifiers does not impede the functional operation of the database, I seek confirmation on whether this particular sequence of events is plausible. Thank you for your attention to this matter.
The text was updated successfully, but these errors were encountered: