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
Philip O'Toole
07620cab41
Reap nodes ( #1114 )
...
Support automatic reaping of nodes
2 years ago
Philip O'Toole
edec152ec9
Fix Store unit test
2 years ago
Philip O'Toole
e158ae8a72
Start HTTP server ASAP
2 years ago
Eng Zer Jun
93eebc6e77
test: fix failing store_restart.test.go on Windows
...
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Eng Zer Jun
da103c9b3e
test: fix failing Test_OpenStoreSingleNode on Windows
...
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Eng Zer Jun
6444926be7
test: fix failing Test_SingleNodeSnapshotInMem on Windows
...
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Eng Zer Jun
6969165330
test: fix failing Test_SingleNodeSnapshotOnDisk on Windows
...
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Eng Zer Jun
5141eff5fc
test: use `T.TempDir` to create temporary test directory
...
This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.
Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
defer func() {
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
}
is also tedious, but `t.TempDir` handles this for us nicely.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2 years ago
Philip O'Toole
0e8e266f96
Merge pull request #1090 from rqlite/fix-remote-load-errors
...
Fix remote-load error handling
2 years ago
Philip O'Toole
893fbb0249
More store-level load operation logging
2 years ago
Philip O'Toole
65cd556549
Fix remote-load error handling
...
Error from remote node was being dropped.
2 years ago
Philip O'Toole
5f33bffa0f
More logging and resolution checks
2 years ago
Philip O'Toole
b0f17b86c7
Notified node checks address resolution
...
If a non-resolvable address is passed to the Store, and then Store then
adds that to the config, it can result in a cluster that seems to have
insufficient members (since the remote node can't be contacted). This
may trigger a new leader election.
2 years ago
Philip O'Toole
47d79c859a
Log database backup time
2 years ago
Philip O'Toole
9fc6ea16e9
Even better defer sequence
2 years ago
Philip O'Toole
555883d1a2
Correct order of deferred calls
2 years ago
Philip O'Toole
54aec1ca33
Tighten up backup code
2 years ago
Philip O'Toole
31bba4c577
Move to Backup proto model
2 years ago
Philip O'Toole
67a6042afb
More style changes
2 years ago
Philip O'Toole
7bfc7afef0
Minor style changes to test logic
2 years ago
Abirdcfly
1b033f3b58
fix minor unreachable code caused by t.Fatal
...
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2 years ago
Philip O'Toole
9dbf590634
Better unit test
2 years ago
Philip O'Toole
dc2b9f5b6f
Ignore freshness when serving queries on Leader
...
It doesn't make sense to check the last leader-contact time when the
node itself is the leader. Any read, when served by the leader, is going
to be within the freshness bound.
Fixes https://github.com/rqlite/rqlite/issues/1048
2 years ago
Philip O'Toole
da8d4fcbe9
Unit test that pre-existing data is gone
2 years ago
Philip O'Toole
89b132ac26
Fix Store-level unit tests
2 years ago
Philip O'Toole
b03ed99eda
Update comment
2 years ago
Philip O'Toole
304124952c
Add Store level changes
...
Needs unit testing, and HTTP testing won't compile.
2 years ago
Philip O'Toole
2729a17279
Move some functions to standalone form
2 years ago
Philip O'Toole
9783ef24b1
Switch to error on self-join attempt
3 years ago
Philip O'Toole
a524ed4979
Ignore join request if node ID is same
3 years ago
Philip O'Toole
e4fed0cee3
Add bootstrap-expect ( #974 )
...
Add cluster-boostrap
3 years ago
Philip O'Toole
ad7986630d
Better command-line flags
3 years ago
Philip O'Toole
ce099087ee
Control whether bbolt sync freelist to disk
...
When true, skips syncing freelist to disk. This improves the database write performance under normal operation, but requires a full database re-sync during recovery.# Please enter the commit message for your changes.
3 years ago
Philip O'Toole
490f654f36
Move to etcd's fork of BoltDB
...
bboltdb is the version the Consul now runs.
3 years ago
Philip O'Toole
4aea326959
Consul and etcd autoclustering ( #957 )
...
This PR introduces new node-discovery integration with Consul and etcd. By using one of those systems with rqlite, automatic clustering of rqlite is much easier.
3 years ago
Philip O'Toole
63b7d24814
Init rand seed once at Store level
3 years ago
Philip O'Toole
24a5dc8c4b
Much better random file names
3 years ago
Philip O'Toole
58adcb87c9
Fix Store unit tests
3 years ago
Philip O'Toole
ca556044e3
Merge branch 'master' of github.com:rqlite/rqlite into refactor-main-bootstrap
3 years ago
Philip O'Toole
2ffb29394f
Fix typo
3 years ago
Philip O'Toole
f5c03d4b60
Try simple refactor of bootstrap
3 years ago
Philip O'Toole
769557db7e
Better variable name
3 years ago
chermehdi
3bfcbffc37
Fix typos and Grammar issues
3 years ago
Philip O'Toole
6509070ce8
More STRONG queries to deal with races
3 years ago
Philip O'Toole
f3a9b79b34
Close obsolete Listeners during Store testing
3 years ago
Philip O'Toole
33bee34f89
More Store restart testing
3 years ago
Philip O'Toole
d74c05c2db
Support disabling in-memory init of on-disk
3 years ago
Philip O'Toole
003301aee6
Minor fixes to log messages ( #920 )
...
Minor fixes to log messages
3 years ago
Philip O'Toole
0b621cbec8
More logging tweaks
3 years ago
Philip O'Toole
5ce51bc2ba
Better comments
3 years ago
Philip O'Toole
05534cc94c
Don't use Windows file paths as IDs
3 years ago
Philip O'Toole
f9f35bf95c
Dump file
3 years ago
Philip O'Toole
7093cb25d3
Fix race in test
3 years ago
Philip O'Toole
9fb114c07f
Recover test after snapshot
3 years ago
Philip O'Toole
519a91e635
Actual recovery node test passes on Linux
3 years ago
Philip O'Toole
f9bcde0722
Back to no-change test
3 years ago
Philip O'Toole
e2e199633a
Fix JSON string in unit test
3 years ago
Philip O'Toole
c111df7ed5
Simpler node-recovery test
3 years ago
Philip O'Toole
92d5bc8b64
Unit test fixes (?)
3 years ago
Philip O'Toole
1b158d09fb
Simple unit test of node-recovery
3 years ago
Philip O'Toole
1abd3007ca
Rename peers.json after successful recovery
3 years ago
Philip O'Toole
cc1de72796
Ensure raft/ exists inside data directory
3 years ago
Philip O'Toole
abccc6ced3
Better function name
3 years ago
Philip O'Toole
d9ad3c080a
Add untested recover-node functionality
3 years ago
Philip O'Toole
32239b5053
Move new function to earlier per convention
3 years ago
Philip O'Toole
4ab72a8194
Refactor to make recover-cluster code easier
3 years ago
Philip O'Toole
5dd4aeed1e
More Snapshot metrics
3 years ago
Philip O'Toole
38eef8ee82
Merge pull request #890 from rqlite/more-abl
...
ABL
3 years ago
Philip O'Toole
dd71c07c73
ABL
3 years ago
Philip O'Toole
0e34dc49ca
Add BoltDB stats
3 years ago
Philip O'Toole
d6be09ba65
Update Snapshot comment
3 years ago
Philip O'Toole
5d48a18950
Check if slice is empty in addition to being nil
3 years ago
Philip O'Toole
bb002bb81b
Block query transactions during serialize
3 years ago
Philip O'Toole
a6da8d474f
Ensure (any) directory for on-disk-path exists
3 years ago
Philip O'Toole
1f33dbb2cb
Fix up Store-open logging
3 years ago
Philip O'Toole
00f4c6bc35
Wait, or timeout, for LeaderID to be set
...
Address https://ci.appveyor.com/project/otoolep/rqlite/builds/40607771
failures.
3 years ago
Philip O'Toole
5c63ff9bff
Check for WaitForLeader errors
3 years ago
Philip O'Toole
c9fdd7d05d
Ensure SQLite file was actually created
3 years ago
Philip O'Toole
105a894fe5
Support explicit SQLite path at Store level
3 years ago
Philip O'Toole
a6346ba9d4
Fix unit test -- start muxes
3 years ago
Philip O'Toole
9aecafedbe
Cluster client resolves advertised local address
...
Also, improve HTTP stats.
3 years ago
Philip O'Toole
d85bb55270
Merge branch 'master' of github.com:rqlite/rqlite into snapshot-gauges
3 years ago
Philip O'Toole
dd692ecf4f
Add gauge-like metric for Snapshot times
3 years ago
Philip O'Toole
e5a94f3592
Merge branch 'master' of github.com:rqlite/rqlite into cluster-execute-queries
3 years ago
Philip O'Toole
9d87a15194
Small simplication
3 years ago
Philip O'Toole
43e60a0469
Perform leader check first for STRONG query
...
Don't wait until Raft layer returns it. There is a small chance of a
false leadership detection, but the cluster would have to be in flux
anyway for that to be the case. Execute does this already.
3 years ago
Philip O'Toole
52ef9836ed
Minor store-level test cleanup
3 years ago
Philip O'Toole
fd98114839
HTTP-level testing passes
3 years ago
Philip O'Toole
3580e341a8
Store-level testing passes
3 years ago
Philip O'Toole
916342395e
Add Store-level FK constraint test
3 years ago
Philip O'Toole
a8d02bc807
Better JSON rendering of DB conf object
3 years ago
Philip O'Toole
deb4dabf2e
Thread through foreign key constraint controls
3 years ago
Philip O'Toole
9ed32972b1
Start adding FK option support
3 years ago
Philip O'Toole
0536bc3c1c
ABL
3 years ago
Philip O'Toole
74d0780a5f
Merge pull request #845 from rqlite/sqlite-options
...
Add SQLite compile-time options to status output
3 years ago
Philip O'Toole
39d0f2ad4a
Merge branch 'master' of github.com:rqlite/rqlite into sqlite-options
3 years ago
Philip O'Toole
fc76327b46
Use FSM index in tests
3 years ago
Philip O'Toole
b8d72f3fc4
New DB and FSM indexes to track state
3 years ago
Philip O'Toole
ea723ee830
Ping databases on open to ensure full availability
3 years ago