Commit Graph

135 Commits (0c787e26bcd102c3bb14050ac893b07ba9ea029f)

Author SHA1 Message Date
Xiang Li 1164c4b83d wal: recover writting seq 2014-09-15 10:14:18 -07:00
Xiang Li 21860bc017 wal: cut(i uint64) -> cut 2014-09-15 10:14:18 -07:00
Yicheng Qin 140fd6d6c4 raft: restart using last written entry also 2014-09-15 09:56:33 -07:00
Yicheng Qin a9af70c52b raft: write entry 0 into log 2014-09-15 09:55:52 -07:00
Yicheng Qin 2030ca202f wal: change wal filename format
Make raftIndex section to be expected raftIndex of next entry.

It makes filename more intuitive and straight-forward.

The commit also adds comments for filename format.
2014-09-12 11:24:28 -07:00
Brandon Philips 884c702512 wal: wal.OpenFromIndex -> wal.OpenAtIndex
The first entry read from the wal should be the index provided. This
name makes that more clear.
2014-09-11 12:52:06 -07:00
Brian Waldon c251304068 *: s/Id/ID/
golang convention dictates that the individual characters in an
abbreviation should all have the same case. Use ID instead of Id.

The protobuf generator still generates code that does not meet
this convention, but that's a fight for another day.
2014-09-10 16:09:08 -07:00
Xiang Li 90c0db3d42 wal: do not save empty state 2014-09-09 10:15:29 -07:00
Xiang Li 54734b0903 main/wal: add a const for 0700 magic number 2014-09-08 15:45:58 -07:00
Xiang Li b094410066 wal: change entries->ents for consistency 2014-09-08 15:40:12 -07:00
Xiang Li adff0f3813 wal: named return values for ReadAll. 2014-09-08 15:36:25 -07:00
Xiang Li 0461c517e4 wal: clarify TODO 2014-09-08 13:57:35 -07:00
Xiang Li 1a6e908971 *: add wal 2014-09-05 09:52:40 -07:00
Xiang Li b98cf17209 wal: move pb files to walpb 2014-09-03 16:46:42 -07:00
Xiang Li bdb954b2f5 wal: fix wal 2014-09-03 15:10:15 -07:00
Xiang Li 85103adfe0 wal: move record method to record.go 2014-09-03 09:20:11 -07:00
Yicheng Qin 442cae6844 wal: support multiple files 2014-09-03 09:20:10 -07:00
Yicheng Qin b5b2031d5b wal: prune repeative logging 2014-09-03 09:20:04 -07:00
Xiang Li 659eb5fd2a wal: make record a protobuf type 2014-09-03 09:20:03 -07:00
Xiang Li 8e06333d45 raft: make State a protobuf type 2014-09-03 09:20:03 -07:00
Xiang Li d6c3ebb1a0 raft: make Info a protobuf type 2014-09-03 09:20:03 -07:00
Yicheng Qin 2d870fa65b wal: add first level logging 2014-09-03 09:20:01 -07:00
Yicheng Qin 969b529b08 wal: fix O_RDONLY attr when opening old file 2014-09-03 09:20:01 -07:00
Xiang Li 38ec659cd6 raft: make Entry a protobuf type 2014-09-03 09:20:01 -07:00
Xiang Li 43c9ca895b wal: fix append entry 2014-09-03 09:20:01 -07:00
Yicheng Qin 28634fce47 wal: Flush -> Sync 2014-09-03 09:20:00 -07:00
Xiang Li d70df4a15d wal: reorgnize wal file 2014-09-03 09:19:59 -07:00
Xiang Li a25cd45876 wal: add CoreOS copyright 2014-09-03 09:19:59 -07:00
Xiang Li 9f5c7b310c wal: add newWal helper func 2014-09-03 09:19:59 -07:00
Xiang Li 9c6f2ed5bb wal: use buffer 2014-09-03 09:19:59 -07:00
Xiang Li 5baefcce26 wal: cleanup 2014-09-03 09:19:59 -07:00
Yicheng Qin 363e952551 wal: add Read 2014-09-03 09:19:59 -07:00
Xiang Li d1cdc02afc wal: add tests for write 2014-09-03 09:19:59 -07:00
Xiang Li 7b180d585e wal: make new work 2014-09-03 09:19:58 -07:00
Xiang Li e72e75876c wal: init 2014-09-03 09:19:58 -07:00