You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(server): rdb save can now save into tcp socket directly. (#317)
In more detail, RdbSaver uses AlignedBuffer that writes into io::Sink in chunks of 4KB. It's great for the direct file I/O, but bad for sockets that receive blocks of 4KB with garbage at the end. I improved the code around this and actually simplified the logic, so now AlignedBuffer is just another Sink that is passed into serializer when writing into files. When sending to sockets a socket sink is passed instead. Also many other unrelated changes grouped into this pretty big cr. 1. dashtable readability improvements. 2. Move methods from facade::ConnectionContext - into facade::Service, make ConnectionContext a dumb object. 3. Optionally allow journal to be memory only (not backed up by a disk) by using a ring buffer to store last k entries in each journal slice. Also renamed journal_shard into journal_slice because journal has presence in each DF thread and not only in its shards. 4. Introduce journal::Entry that will consolidate any store change that happens in the thread. 5. Introduce GetRandomHex utility function. 6. Introduce two hooks: ServerFamily::OnClose that is called when a connection is closed, and ServerFamily::BreakOnShutdown that is called when process exits and any background fibers neet to break early. 7. Pull some noisy info logs out of rdb_load class. 8. Snapshot class now has the ability to subscribe to journal changes, thus it can include concurrent changes into the snapshot. Currently only journal::Op::VAL is supported (it's part of RDB format anyway). Signed-off-by: Roman Gershman <roman@dragonflydb.io>
0 commit comments