bdeggleston commented on PR #4892: URL: https://github.com/apache/cassandra/pull/4892#issuecomment-4756561808
Just pushed up a small test fix. Unlike normal writes, mutation tracking noops a write if we’ve already seen it, which is a reasonable optimization when we’re tracking each write. Unfortunately this can bite us on startup. If witnessed offsets are flushed to disk before the memtable containing those offsets are also flushed to sstables, then on startup mutation tracking will think it’s already seen all of those mutations and not write them to the memtable and losing a bunch of data in the process. The fix is pretty simple and just does what commit log replay does. Commit log replay applies it’s mutations with `makeDurable` set to false which means apply to the memtable but not the commit log. So I updated `applyInternalTracked` to also take a `makeDurable` flag. If this is false, we now skip applying the mutation, and we also apply the mutation to the memtable whether we’ve seen it before or not. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

