Philip O'Toole
ad916270d2
Bring go mod import path into compliance
9 months ago
Philip O'Toole
9b193f2f4c
More coverage cleanup
9 months ago
Philip O'Toole
2e81a92e3a
Fix defer ordering
9 months ago
Philip O'Toole
dd1f511f0a
Add unit test for cleanup
9 months ago
Philip O'Toole
5942e986a8
Simplify and correct DB path logic
9 months ago
Philip O'Toole
f6b0be13ed
Create temp SQLite files in same location as db
9 months ago
Philip O'Toole
54a2487807
Don't test WAL removal
...
Look, it could always happen if the node is crashed hard. A WAL file
could be left around at anytime, just accept it and don't bother with
the cleanup.
9 months ago
Philip O'Toole
5f9c9aad2d
Don't re-open and close on shutdown
9 months ago
Philip O'Toole
5f3e854c4a
Remove some blank lines
9 months ago
Philip O'Toole
364128c9b0
Tighter code
9 months ago
Philip O'Toole
10129ed312
Confirm restored data looks like a SQLite file
9 months ago
Philip O'Toole
c4e09c1f47
Noop earlier - make sure it's successful
9 months ago
Philip O'Toole
4988c29951
Log at DB level if open times are higher
9 months ago
Philip O'Toole
e7ab1389c9
Periodically log boot progres
9 months ago
Philip O'Toole
140f106acc
Add ReadFrom to Store
9 months ago
Philip O'Toole
e6b703a0c0
Remove ability to trigger chunked-loading
...
The low-level Raft system still recognizes the Chunk command, so that
this system can interop with older versions, which might still have a
Chunk command in logs.
9 months ago
Philip O'Toole
1e34b89cd9
Don't load invalid database
9 months ago
Philip O'Toole
3cc47bceee
Revert to simpler one-shot load for SQLite files
9 months ago
Philip O'Toole
cc4addf7e0
Noop() returns ApplyFuture
9 months ago
Philip O'Toole
7032ac7319
Don't truncate to 0 trailing entries
...
The Raft code seems to be have an unsigned int overflow problem when
this happens.
9 months ago
Philip O'Toole
0ef35f1cbc
Fix restart issue after chunked-loading
9 months ago
Philip O'Toole
caca666757
Remap "load in progress" to error type
9 months ago
Philip O'Toole
5c86e2ae70
Better name
9 months ago
Philip O'Toole
c4407bf616
More comment fixes
9 months ago
Philip O'Toole
8708d51746
Fix GoDoc
9 months ago
Philip O'Toole
6fdd454632
Introduce explicit FSM type
...
This will make the code cleaner, and help clean up un-closed file
handles.
9 months ago
Philip O'Toole
abc0898c5f
Close all dechunkers at Store shutdown
9 months ago
Philip O'Toole
e3fa8584c0
Store can handle snapshotting empty WAL files
9 months ago
Philip O'Toole
36ad021fdd
Don't ignore errors
10 months ago
Philip O'Toole
e0c6861ca8
Improve test
10 months ago
Philip O'Toole
e6ddf27072
Unit test sync between chunked loading and Snapshotting
10 months ago
Philip O'Toole
59e928d058
Remove superfluous blank line
10 months ago
Philip O'Toole
df76560168
Sync and report number of loads in progress
10 months ago
Philip O'Toole
b0cd5c5a0c
Add more Load stats
10 months ago
Philip O'Toole
e0f361509a
Handle aborted chunks at lowest level
10 months ago
Philip O'Toole
dd6f386450
Refactor chunk loading
10 months ago
Philip O'Toole
94898ce43e
Track loads in progress
10 months ago
Philip O'Toole
44fa23b714
Use TrailingLogs = 0 to truncate log
10 months ago
Philip O'Toole
264e9822eb
Standardize on chunk size
10 months ago
Philip O'Toole
d726a4c780
Correct and simplify logic
10 months ago
Philip O'Toole
a96112b41d
Snapshot log after one-command load
10 months ago
Philip O'Toole
1f1ebf209f
Don't delete last log
10 months ago
Philip O'Toole
97e9b14bdf
Fix race during testing
10 months ago
Philip O'Toole
8adc11fb83
Snapshot in a goroutine
10 months ago
Philip O'Toole
4b272d04f1
Better use of counters in testing
10 months ago
Philip O'Toole
c39d3472bc
Check snapshot occurs at unit level
10 months ago
Philip O'Toole
c93447e29f
Delete chunked load entries in log after loading
10 months ago
Philip O'Toole
0dcc67f6f1
Perform full snapshot after chunked load
...
This must happen as chunked loading directly changes the SQLite file,
invalidating any existing Snapshots. Also, add missing unit tests for
chunked loading.
10 months ago
Philip O'Toole
31aef91d17
Add FullNeeded() to Snapshot store
...
It may be necessary to override the FullNeeded definition, so wrap it.
10 months ago
Philip O'Toole
8211af961d
Move some VACUUM checks to the Store
10 months ago
Philip O'Toole
5c7996fd98
Support optional VACUUM on backup
10 months ago
Philip O'Toole
a0bf10b021
Move VACUUM to DB layer
10 months ago
Philip O'Toole
f26f15476e
Actually add Provider type
10 months ago
Philip O'Toole
dfb8a60c17
Move Store Provide to a distinct type
10 months ago
Philip O'Toole
3ae4255e62
Backup-related cleanups
10 months ago
Philip O'Toole
4c31c480f5
Better name
10 months ago
Philip O'Toole
5a8a2744ff
Support skipping verifying frame data
...
This halves the Compacting Scan time, and doesn't seem necessary since
rqlite is the only system writing the WAL files.
10 months ago
Philip O'Toole
ee13427c67
Tigher logging
10 months ago
Philip O'Toole
bd9e96ea02
Integrate Compacting WAL writer
10 months ago
Philip O'Toole
d53a34f765
Don't log too much
10 months ago
Philip O'Toole
ba98e88a7b
Update store.go
10 months ago
Philip O'Toole
70d5e6de34
Check join and notify addresses are resolvable
10 months ago
Philip O'Toole
66c1002c32
Remove obsolete metrics
11 months ago
Philip O'Toole
b2663de630
Rename snapshot2 -> snapshot
11 months ago
Philip O'Toole
c11d059551
Better function name
11 months ago
Philip O'Toole
10e6f1b115
Clean up snapshot FDs
11 months ago
Philip O'Toole
93566415e3
Just run bad test
11 months ago
Philip O'Toole
47d877cc25
Don't close dst file until done
11 months ago
Philip O'Toole
09712788c9
Store now builds with snapshot2
11 months ago
Philip O'Toole
6a60108f0c
Start work on Restore and Recover
...
Builds, but still needs more work. It's referencing snapshot(1).
11 months ago
Philip O'Toole
d34c35df31
No need to Store-level WAL selection
11 months ago
Philip O'Toole
5e3d481a6e
Fill out methods on SnapshotStore v2
12 months ago
Philip O'Toole
7c420407c2
WIP snapshot2
...
Close() on the Sink is done (first pass). What's needed next are all the
methods on the Store (Open, List, FullNeeded). I also need to decide
what getSnapshots should really do -- return names or a slice of meta?
12 months ago
Philip O'Toole
974f939ffe
Add an interface between Store and Snapshot Store
...
This will make it easier to swap new implementations in.
1 year ago
Philip O'Toole
be17f2a3cc
Correct variable assignment order
1 year ago
Philip O'Toole
5b4ff9b8ce
Fix test code
1 year ago
Philip O'Toole
53b432a391
More DB and Snapshot stats
1 year ago
Philip O'Toole
59e6a23b02
Clean-up logging
1 year ago
Philip O'Toole
2fff800273
Substantially shrink Test_MultiNodeClusterLargeQueuedWrites
1 year ago
Philip O'Toole
378dd4b2a1
Simpler logging of first application
1 year ago
Philip O'Toole
5ab7069aa0
Update store.go
1 year ago
Philip O'Toole
a4f7431108
Log first time a log is applied
1 year ago
Philip O'Toole
ad86a2989b
Use non-racy function for Leader ID and address
1 year ago
Philip O'Toole
225b5346f5
Add basic stats for Snapshot store
1 year ago
Philip O'Toole
1ffb44cd38
ABL
1 year ago
Philip O'Toole
854fba0e66
Better way to detect previous close
1 year ago
Philip O'Toole
d78d2f4d9d
Short circuit EOF from decompressor
...
The gzip NewReader() seems to hang sometimes when reopened with the old
reader. Therefore just record that we have closed, and never reopen it.
1 year ago
Philip O'Toole
3eb4607a74
GoDoc
1 year ago
Philip O'Toole
a49385e1d3
Add end-to-end compress-decompress test
1 year ago
Philip O'Toole
52aa68497d
Better comment on disabling multistream
1 year ago
Philip O'Toole
06a94e50bf
Raft snapshotting runs to 100%
...
Still failing later.
1 year ago
Philip O'Toole
cb384a9df2
More test tweaks
1 year ago
Philip O'Toole
2395f30ddf
Be sure we don't write footer twice
1 year ago
Philip O'Toole
57eabce899
Protect against double-close of NodeTransport
1 year ago
Philip O'Toole
365abac57c
Simple unit test of NewNodeTransport
1 year ago
Philip O'Toole
fedbdb5478
Enable GZIP snapshot compression
...
Tests are failing.
1 year ago
Philip O'Toole
195981868f
Typo
1 year ago
Philip O'Toole
6efdf9f2b9
Add Decompressor
1 year ago
Philip O'Toole
1fe81713c9
More Compressor tests
1 year ago
Philip O'Toole
55b3aaa805
Add initial version of Gzipping reader
1 year ago
Philip O'Toole
d2c5acc447
Wrap transport as passthru
1 year ago
Philip O'Toole
47e9bbde49
Fix single-node upgrade test
1 year ago
Philip O'Toole
cb989d09a2
Some changes from PR v2
1 year ago
Philip O'Toole
1a24557c19
Merge remote-tracking branch 'origin' into wal-snapshot-store-v3
1 year ago
Philip O'Toole
208fc20659
Fix more uses of random
1 year ago
Philip O'Toole
54713b63f4
Merge remote-tracking branch 'origin' into wal-snapshot-store-v3
1 year ago
Philip O'Toole
c51b8364e8
Fix import path
1 year ago
Philip O'Toole
2288cfe2a9
random only needed by store
1 year ago
Philip O'Toole
c1a8b4a13a
Use global, sync'ed random source
...
Almost unbelievably it appears tests on AppVeyor get the same value when
seeding the random generator. See https://ci.appveyor.com/project/otoolep/rqlite/builds/47853399
1 year ago
Philip O'Toole
c6e214de1a
Remember store attributes
1 year ago
Philip O'Toole
dda86be0d3
Better Store open-and-close logging
1 year ago
Philip O'Toole
c44d020c11
Only attempt to checkpoint once
1 year ago
Philip O'Toole
d6b9c5b39e
Close streams
1 year ago
Philip O'Toole
ee8b23ba94
More logging
1 year ago
Philip O'Toole
e8e0381622
Log when Store closes
1 year ago
Philip O'Toole
a6134b02bc
Instrument the FSM snapshot process
1 year ago
Philip O'Toole
76867a682f
Time FSM snapshot creation
1 year ago
Philip O'Toole
ab6ca783e1
Checkpoint database during Recovery
1 year ago
Philip O'Toole
a9e895bee2
Some cleanups
1 year ago
Philip O'Toole
bd0f78391e
Remove unneeded FSM snapshot code
1 year ago
Philip O'Toole
47476d5b58
Integrate new snapshoting with Store
...
- Snapshot
- Restore
- RecoverNode
1 year ago
Philip O'Toole
5eb4e38cbc
Add comments and errors
1 year ago
Philip O'Toole
e4d5ffb8a9
Flesh our Store check()
1 year ago
Philip O'Toole
48ea4bbfd8
Use a single header
1 year ago
Philip O'Toole
ea8dc3ed18
More test fix-up post removal of in-memory
1 year ago
Philip O'Toole
6895525482
Rename some tests
1 year ago
Philip O'Toole
aa72408bc5
Remove racy use of rand
1 year ago
Philip O'Toole
07d49961d8
Remove unused functions
1 year ago
Philip O'Toole
9e31a054aa
RecoverNode now uses on-disk database
1 year ago
Philip O'Toole
88ce311b37
Remove all WAL-related files when loading new DB
1 year ago
Philip O'Toole
b931e387be
First pass at removing in-memory support
1 year ago
Philip O'Toole
23b8b6e5c9
Actually rename
1 year ago
Philip O'Toole
2ac27c2ffc
Move Store tests back to single directory
1 year ago
Philip O'Toole
65c6a56468
Remove the file
1 year ago
Philip O'Toole
88d448851d
Blank out on-disk store tests
1 year ago
Philip O'Toole
02b7ea7955
Close Store so temp storage can be cleaned up
1 year ago
Philip O'Toole
e47c7a1b7b
Stress-test snapshotting
1 year ago
Philip O'Toole
e497ee75f9
Fix typo
1 year ago
Philip O'Toole
f06e547ab5
Less disk IO during load
1 year ago
Philip O'Toole
f5517c0f66
Correct comment
1 year ago
Philip O'Toole
9bdf048975
Better naming of temp backup file
1 year ago
Philip O'Toole
b5cb889e1e
Auto-restore doesn't require ready() check
1 year ago
Philip O'Toole
b7633143cc
Restore from file uses chunking
1 year ago
Philip O'Toole
5ca5ce342e
Support internode LoadChunk()
1 year ago
Philip O'Toole
1c8e52c5f7
Test_SingleNodeLoadBinaryFromReader passes
...
That's good, but much more extensive testing needed, and this needs to
replace the existing load path -- and then we move to 8.0.
1 year ago
Philip O'Toole
93a752ae0e
Better variable names
1 year ago
Philip O'Toole
1c6f691ff8
Integrate chunking - WIP
...
I need more sophisticated dechunker management.
1 year ago
Philip O'Toole
13d47b24d8
Store can load from an io.Reader
...
This may be helpful for chunked-loads.
1 year ago
Philip O'Toole
a40c43725f
More logic reversal
1 year ago
Philip O'Toole
f81aad8fd3
Revert logic for clarity
1 year ago
Philip O'Toole
21dff4a68c
Remove on-disk-startup control
...
With the move to WAL and "synchronous mode" to OFF, on-disk startup
times are very close to in-memory. There is no need for this control
anymore and it complicates the start-up code.
1 year ago
Philip O'Toole
e845e0c243
Fix remaining expression test cases
1 year ago
Philip O'Toole
f7ced46377
Count number of DB stats errors
1 year ago
Philip O'Toole
36fa7f2afd
Detect DB stats error and log
1 year ago
Philip O'Toole
7ce2c6b99a
Fix comment
1 year ago
Philip O'Toole
7432bceca3
Since we're passed a ReadCloser, close it
1 year ago
Philip O'Toole
4342650c33
Fix RecoverNode
1 year ago
Philip O'Toole
ad73779285
Periodically record actually applied index
...
This ensures the system doesn't apply uncommitted log entries to the
FSM, if it runs the in-memory startup. There have been no reports of
this in the field -- it is an edge case -- but this removes any chance
of it.
1 year ago
Philip O'Toole
abfe056b4c
Remove any -wal and -shm files on shutdown
...
If in WAL mode, open-and-close again to remove the -wal file. This is not strictly necessary, since any on-disk database files will be removed when rqlite next starts, but it leaves the directory containing the database file in a cleaner state.
1 year ago
Philip O'Toole
6cd8d30749
Fix Store-level database-backup test
1 year ago
Philip O'Toole
a6925414ef
Better comments
1 year ago
Philip O'Toole
b2f28d1181
Better WAL control
1 year ago
Philip O'Toole
2f7672d897
Enable WAL mode
1 year ago
Philip O'Toole
585f9c9c05
Use Snapshot decoder in Store
1 year ago
Philip O'Toole
58534d4815
Better name for V1 Snapshotter
1 year ago
Philip O'Toole
c87931c45c
Factor Snapshot creation into own module
1 year ago
Philip O'Toole
3f462eecfa
Remove all on-disk SQLite files on startup
1 year ago
Philip O'Toole
7e1b8d12d7
Add full WAL support to DB layer
1 year ago
Philip O'Toole
eed215c664
Only 1 Snapshot needs to be retained
1 year ago
Philip O'Toole
b9253e6b41
Improve logging in Store
1 year ago
Philip O'Toole
4a7ac2850f
rqlite doesn't (yet) support WAL mode SQLite data
1 year ago
Philip O'Toole
92bc513242
Move FSMSnapshot to own source file
1 year ago
Philip O'Toole
e4a0d96f23
Further refactoring
1 year ago
Philip O'Toole
3dd37f8771
Move on-disk Store testing to distinct file
1 year ago
Philip O'Toole
6c7c32ab4e
Remove racy test code
1 year ago
Philip O'Toole
aed541b98e
Poll nodes
1 year ago
Philip O'Toole
8a8e126061
Use some loops
1 year ago
Philip O'Toole
ef42d28e36
Refactor and log more during test
...
https://ci.appveyor.com/project/otoolep/rqlite/builds/47107026 - this
looks racy, as the Leader had been detected, but the config not yet
applied. Leave for now and see if more info can be gathered. This may be
happening because WaitForLeader() has a fast path now.
1 year ago
Philip O'Toole
1b299b7e9b
Tigher logic
1 year ago
Philip O'Toole
9faea33da7
Give time for new leader to be elected
1 year ago
Philip O'Toole
7badba4a7a
Try fast paths
1 year ago
Philip O'Toole
76ba50ca86
Log last (if any) WaitForLeader error
1 year ago
Philip O'Toole
498cc39925
Fix Store unit tests
1 year ago
Philip O'Toole
ef403cdcc6
Fix up WaitForLeader
...
Add dedicated error codes too.
1 year ago
Philip O'Toole
562b1de03b
Multi-node testing of WaitForRemoval()
1 year ago
Philip O'Toole
94dbff6851
Unit test WaitForRemoval() on Store
1 year ago
Philip O'Toole
c05e091cd1
Add WaitForRemoval
1 year ago
Philip O'Toole
fb73b8e313
Add Contains() to Servers
1 year ago
Philip O'Toole
c23d3e60b1
Reuse existing consistency level
1 year ago
Philip O'Toole
ee01569f53
Request Freshness testing
1 year ago
Philip O'Toole
2186fa0c66
Merge branch 'master' of github.com:rqlite/rqlite
1 year ago
Philip O'Toole
c40303b6ae
Fix test error message
1 year ago
Philip O'Toole
ddea64ebe0
Fix Store tests
1 year ago
Philip O'Toole
18b76ebd4f
go fmt
1 year ago
Philip O'Toole
2f8d4e95e0
Update store.go
1 year ago
Philip O'Toole
3058d3e9fc
Fix transaction handling in db.Request()
1 year ago
Philip O'Toole
eea101a1d5
Fix duplicate import
1 year ago
Philip O'Toole
c995986630
Add parameter tests
1 year ago
Philip O'Toole
061ba8eed5
Add Request Tx unit test
1 year ago
Philip O'Toole
2261cb30c9
First unit test of Store.Request()
1 year ago
Philip O'Toole
f7cdbdea68
Handle Command_COMMAND_TYPE_EXECUTE_QUERY in Store
...
Works! Store.Request() needs unit testing however.
1 year ago
Philip O'Toole
b2b0b188e9
Factor out functions
1 year ago
Philip O'Toole
e171b2e725
Unit test RequiresLeader
1 year ago
Philip O'Toole
89f472743b
Start adding Store.Request()
1 year ago
Philip O'Toole
7680483793
Tighten up remove
1 year ago
Philip O'Toole
e64d78b809
Support removing self from cluster on shutdown
1 year ago
Philip O'Toole
02b6f7df61
selfLeaderChange is not just about restores
1 year ago
Philip O'Toole
159b127101
Clean up comments
1 year ago
Philip O'Toole
0c6be22478
Close auto-restore file
1 year ago
Philip O'Toole
1fa7cf73a7
Log any failure to delete auto-restore file
1 year ago
Philip O'Toole
1941c947c7
Fix comment
1 year ago
Philip O'Toole
466c757dcf
Add long-missing init call to Store stats
1 year ago
Philip O'Toole
42fd612cf3
Better auto-restore counts compare
1 year ago
Philip O'Toole
ee55a35c03
SetRestorePath unit testing
1 year ago
Philip O'Toole
88fe7e6847
ResetStats for this test
1 year ago
Philip O'Toole
e7919a906f
Avoid the race during testing
1 year ago
Philip O'Toole
7c88b93979
Fix race during testing
1 year ago
Philip O'Toole
31467482a3
Store-level multi-node auto-restore testing
...
This test ensures that auto-restoring works as expected when
Bootstrapping is enabled.
1 year ago
Philip O'Toole
bf1e1cb1cd
Add first tested version of Store auto-restore
1 year ago
Philip O'Toole
5c2e8e7ad6
Add channel which gets signal on becoming Leader
1 year ago
Philip O'Toole
833d9d3a6f
Perform older checks first
1 year ago
Philip O'Toole
5e3f294dfa
Only check for a ready store if making changes
1 year ago
Philip O'Toole
2ce3c5f34c
Check Store is ready in more places
1 year ago
Philip O'Toole
57ca03014b
More integration and testing of Store readiness
1 year ago
Philip O'Toole
716f84ff28
Store supports registering "ready" channels
1 year ago
Philip O'Toole
372e4dd4a9
Store implements simpler Provide() interface
1 year ago
Philip O'Toole
5fcc222f73
Better Store comment
1 year ago
Philip O'Toole
102869eb6d
Unit test Provide() on the Store
1 year ago
Philip O'Toole
ae97060f2c
Implement the DataProvider interface on the Store
1 year ago
Philip O'Toole
519df067cc
Check for more possible errors with peers
...
https://github.com/rqlite/rqlite/issues/1217
1 year ago
Philip O'Toole
45b246aa0a
Test IsReadOnly using table tests
1 year ago
Philip O'Toole
35df643a0b
Remove unneeded type assertions
1 year ago
Philip O'Toole
1794724ef0
Remove unused code and fix error handling
1 year ago
Philip O'Toole
93b3308502
Skip any files that disappear during walking
1 year ago
Philip O'Toole
ff001bc5a8
Migrate to a Protos data model for Notify Requests
2 years ago
Philip O'Toole
a782513a11
Migrate to a join-request proto
2 years ago
Philip O'Toole
fdf5fce053
Update store.go
2 years ago
Philip O'Toole
2730fa06e5
Empty config means not a voter
2 years ago
Philip O'Toole
5636febf9a
Add IsVoter() and add to status/ output
2 years ago
Philip O'Toole
defde21281
Merge remote-tracking branch 'origin' into ignore-join-explicit-if-state
2 years ago
Philip O'Toole
90b4dc0745
Silently ignore unchanged node self-joins
2 years ago
Philip O'Toole
54d61c7866
Update store.go
2 years ago
Philip O'Toole
4131cdb743
Unit test stepdown on shutdown
2 years ago
Philip O'Toole
a2899a1cdd
Support stepping down before shutting down
2 years ago
Philip O'Toole
0702e39ace
Add ResetStats
2 years ago
Philip O'Toole
4da5b6322f
Log message could be confusing with remote remove
2 years ago
Philip O'Toole
98575d727b
Start adding remote remove node
...
More testing, including unit testing, required.
2 years ago
Philip O'Toole
bfc35eaf7c
Simplify reap command line flags ( #1118 )
...
Simplify reap command line flags
2 years ago
Philip O'Toole
220424c7d1
Simple refactor, better Go style
2 years ago
Philip O'Toole
e74bfc182a
Use new Encoder everywhere
2 years ago