Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(145)

Issue 1820042: Batch commit blocks to reduce syncs

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 11 months ago by bd_
Modified:
11 years, 5 months ago
Reviewers:
Visibility:
Public.

Description

Batch commit blocks to reduce syncs Previously, committing a block would require as many as four syncs: * A sync to the block file itself * A sync to open the block index database * A sync to commit the block index transaction (+1 for each subtxn) * A sync to close the block index transaction When this is performed for every block, and you have 60k+ to commit, these syncs take a significant amount of time. This patch queues blocks to be committed in a seperate thread, once every second. This commit performs a single commit/sync at the very end of the process, greatly reducing the amount of time spent syncing, without compromising data integrity.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -37 lines) Patch
M db.h View 1 chunk +6 lines, -1 line 0 comments Download
M main.h View 3 chunks +5 lines, -9 lines 0 comments Download
M main.cpp View 13 chunks +116 lines, -26 lines 0 comments Download
M net.cpp View 3 chunks +7 lines, -1 line 0 comments Download

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b