Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/14479
Change subject: log: separate out allocation logic ...................................................................... log: separate out allocation logic The Log class has a few responsibilities: 1. adding batches to an in-memory queue asynchronously 2. picking off batches from the queue and writing them to disk 3. pre-allocating files in the background when a log segment grows too large 4. "rolling" onto a newly pre-allocated file once it is fully allocated 5. garbage collecting old log segments 6. a myriad of other bookkeeping related to indexing and size 1 and 2 have been neatly encapsulated in the Log::AppendThread subclass, leaving the rest as the monolith that is the Log class. This patch separates out 3 and 4 into a separate SegmentAllocator class. Change-Id: I08be4dbdd8e98b02278de76273e931c314b08161 --- M src/kudu/consensus/log-test-base.h M src/kudu/consensus/log.cc M src/kudu/consensus/log.h 3 files changed, 313 insertions(+), 295 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/79/14479/1 -- To view, visit http://gerrit.cloudera.org:8080/14479 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I08be4dbdd8e98b02278de76273e931c314b08161 Gerrit-Change-Number: 14479 Gerrit-PatchSet: 1 Gerrit-Owner: Andrew Wong <[email protected]>
