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 *Index.Write(), the very first if condition checks whether there is enough space to write one more index entry. If not, it bails out with EOF error. Unfortunately, at this point, the record is already written to the store. This EOF error gets propagated all the way back to *Log.Append() and the append operation fails entirely.
What should have happened in this case is that a new segment should have been created and the record should have been appended to this new segment. Unfortunately, in *Log.Append(), the call to l.newSegment() is in the wrong place. It should have been called before we append to the active segment and not after it.
The text was updated successfully, but these errors were encountered:
In
*Index.Write()
, the very first if condition checks whether there is enough space to write one more index entry. If not, it bails out with EOF error. Unfortunately, at this point, the record is already written to the store. This EOF error gets propagated all the way back to*Log.Append()
and the append operation fails entirely.What should have happened in this case is that a new segment should have been created and the record should have been appended to this new segment. Unfortunately, in
*Log.Append()
, the call tol.newSegment()
is in the wrong place. It should have been called before we append to the active segment and not after it.The text was updated successfully, but these errors were encountered: