inegm / proglog Goto Github PK
View Code? Open in Web Editor NEWA replicated (raft) log.
A replicated (raft) log.
See DSwG p 137.
On init, the index
resizes the memory-mapped files to their maximums (it's too late to extend once mapped) and resizes them back down on Close()
. If Close()
doesn't run for some reason (eg. power loss), the memory-mapped files could be corrupted. Graceful shutdown should include checking for and fixing corrupted file at startup.
See pages 33 and 34 of DSwG.
Consider implementing the transaction pattern.
edit: This appears to be dealt with later. See the errata page.
Locks can be implemented per segment rather than across the whole log.
See p 45 of DSwG.
The nearestMultiple
function from page 41 of DSwG isn't called by anything. It does, however, have a good reason to exist (see the text describing it in the book). The printed implementation (p 41) is erroneous (see the book's errata page).
Implement it correctly, and apply it to the log to ensure no fractional segments are created.
See pp 78-87 of DSwG (Authenticate the Server with TLS) and https://github.com/inegm/proglog/tree/main/test/server-csr.json
Example output:
--- FAIL: TestServer/consume_past_log_boundary_fails (0.03s)
server_test.go:112:
Error Trace: /Users/daedalus/Code/learning/golang/proglog/internal/server/server_test.go:112
/Users/daedalus/Code/learning/golang/proglog/internal/server/server_test.go:30
Error: Received unexpected error:
rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, not ::"
Test: TestServer/consume_past_log_boundary_fails
with similar results for the other TestServer
scenarios.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.