mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-26 02:58:44 -06:00
Readahead + NBS benefit greatly when "related" Chunks are close to each other. The current code did a good job of writing siblings in the Chunk graph next to each other, but "cousins" (that is, children whose parents are siblings) might wind up spread quite far apart. This patch makes WriteValue hold onto novel Chunks until it sees a _grandparent_ come through the pipeline. All of that Chunk's queued grandchildren will be Put at that time. Additionally, ValueStore.Flush() now takes a Hash and flushes all Chunks that are reachable from the Chunk with that Hash, as opposed to simply flushing all Chunks to the BatchStore. This means that there's now no supported way to write orphaned Chunks/Values to a Database. Fixes #3051 * More logging for TestStreamingMap2