Commit Graph

8 Commits (8399d2a1597deb0d2e27d18c277ff13135867c57)

Author SHA1 Message Date
Paul Dix 8ed3a1b440
feat: Initial prototype of WriteBuffer and WAL (#271)
This is the initial prototype of the WriteBuffer and WAL. This does the following:

* accepts a slice of ParsedLine into the DB
* writes those into an in memory structure with tags represented as u32 dictionaries and all field types supported
* persists those writes into the WAL as Flatbuffer blobs (one WAL entry per slice of lines written, or WriteBatch)
* has a method to return a table from the buffer as an Arrow RecordBatch
* recovers the WAL after the database is closed and opened back up again
* has a single test that covers the end-to-end from the DB side
* It doesn't include partitioning yet. Although the write_lines method does actually try to do partitions on time. That'll get changed to be something more general defined by a per database configuration.
* hooked up to the v2 HTTP write API
* hooked up to a read API which will execute a SQL query against the data in the buffer

This includes a refactor of the WAL:

Refactors the WAL to remove async and threading so that it can be moved higher up. This simplifies the API while keeping just about the same amount of code in ParitionStore to handle the asynchronous writes.

This also modifies the WAL to remove the SideFile implementation, which was causing significant performance problems and write amplification. The downside is that WAL writes are no longer guarranteed atomic.

Further, this modifies the WAL to keep the active segement file handle open. Appends now don't have to list the directory contents and look for the latest file and open the file handle to do appends, which should also improve performance and reduce iops.
2020-09-08 14:12:16 -04:00
Carol (Nichols || Goulding) 936e7c2a6f docs: Change some answered questions to statements 2020-05-27 09:49:05 -04:00
Carol (Nichols || Goulding) d84fdb13ec feat: Delete entries from the WAL up to some entry number 2020-05-27 09:46:02 -04:00
Carol (Nichols || Goulding) a312bcc9bb test: Move file size tests out of the file rollover tests 2020-05-20 11:12:07 -04:00
Carol (Nichols || Goulding) 23fd94664e feat: Keep track of the total size of all the files in the WAL 2020-05-20 11:12:07 -04:00
Carol (Nichols || Goulding) f2823ccecd feat: WAL file rollover based on size of file 2020-05-18 14:08:24 -04:00
Jake Goulding cbf4dd96e1 feat: Track a sequence number in the WAL 2020-05-13 09:17:33 -04:00
Jake Goulding 4dd7a8cea8 feat: Introduce a WAL tailored for delorean 2020-05-11 15:38:44 -04:00