[tahoe-dev] Dev Chat summary

Brian Warner warner at lothar.com
Wed Aug 7 18:24:51 UTC 2013


On 8/7/13 9:26 AM, Greg Troxel wrote:
> 
>   Brian specifically suspects the DB writes, since he's heard that
>   SQLite tries to be honest about durability and does an fsync() after
>   every db.commit().
> 
> Perhaps multiple updates should be gathered into transactions.

Yeah. The question is probably going to be "how many updates can appear
at once". Most of the time, we're only touching one share (like when a
new share is uploaded, or when a client adds a new lease to an existing
share). Some of the crawler operations could be batched (expiring a
bunch of leases at the same time), but usually the most natural grouping
will only have one change.

We could use a timeout, like most filesystems do, where you do at most
one flush every 5 seconds. Might not be very clean with DB transactions,
though, you'd have some large txn that spans multiple requests.

The unit tests are unusual because they have lots of servers (typically
10) running in the same process, all being touched at the same time.
OTOH, we don't crash the server in the middle of the process during
tests, so durability isn't an issue.

cheers,
 -Brian




More information about the tahoe-dev mailing list