1
0
Fork 0

340 Commits (b7be6f3e82ee6ca88bd788332b419c9843d2aed6)

Author SHA1 Message Date
chermehdi 3bfcbffc37 Fix typos and Grammar issues 3 years ago
Philip O'Toole 659bf26d7f Better name for command-line flag 3 years ago
Philip O'Toole d74c05c2db Support disabling in-memory init of on-disk 3 years ago
Philip O'Toole a4dc56e679 Ignore own join address if passed
Fixes https://github.com/rqlite/rqlite/issues/713.
3 years ago
Philip O'Toole 0a31c90b06 Ignore disco ID if there is preexisting state
Fixes https://github.com/rqlite/rqlite/issues/347
3 years ago
Philip O'Toole 0b621cbec8 More logging tweaks 3 years ago
Philip O'Toole 2e7bf1c881 Even friendlier log message when start-up is done 3 years ago
Philip O'Toole 38a16849ca Record compiler in logs and status 3 years ago
Philip O'Toole 25f4c70d04 Update URL in logog 3 years ago
Philip O'Toole cdd83ce9e9 Start the HTTP server before doing any joins
There is no point waiting for join operations to complete before
starting the HTTP server. In the event the join fails it just introduces
delays due to join-retrys. The HTTP API service is meant to be robust in
the face of a non-ready underlying Store anyway.
3 years ago
Philip O'Toole dd71c07c73 ABL 3 years ago
Philip O'Toole 1ea29e108a Exit if on-disk-path is set, but on-disk is not 3 years ago
Philip O'Toole 9965f520a8 Add a performance-related guide 3 years ago
Philip O'Toole 105a894fe5 Support explicit SQLite path at Store level 3 years ago
Philip O'Toole 81a234abd0 Command line option for SQLite on-disk file path 3 years ago
Philip O'Toole 9aecafedbe Cluster client resolves advertised local address
Also, improve HTTP stats.
3 years ago
Philip O'Toole a8d436e944 Improve stats 3 years ago
Philip O'Toole 3ff1b7092a Merge branch 'master' of github.com:rqlite/rqlite 3 years ago
Philip O'Toole f71bfd183d Update CHANGELOG 3 years ago
Philip O'Toole f1a7e7e8ec Use locally-enabled cluster client in HTTP service 3 years ago
Philip O'Toole a4638ad514 Set Raft Adv once and for all 3 years ago
Philip O'Toole 071112aef7 Pass Store to Cluster service 3 years ago
Philip O'Toole 796ef147f7 Hook in explicit Cluster Dialer 3 years ago
Philip O'Toole 606b45051b Fix help typo 3 years ago
Philip O'Toole 9ed32972b1 Start adding FK option support 3 years ago
Philip O'Toole b8d72f3fc4 New DB and FSM indexes to track state 3 years ago
Philip O'Toole e0da96dd55 Remove support for specifying SQLite DSN
This is a breaking change. However this feature hasn't been tested and
allows end-users to break the system too easily. Low-level control over
the SQLite database is better done with PRAGMA commands where possible.
3 years ago
Philip O'Toole f0f8bf0388 Change what-was too noisy logging 3 years ago
Philip O'Toole 4591e2df35 Don't ignore -join even if previous state exists 3 years ago
Philip O'Toole 232449b113 Correct help text for -node-id 3 years ago
Philip O'Toole 4c43049f9c Start cluster service as early as possible 3 years ago
Philip O'Toole 585a204f8b Add more startup logging 3 years ago
Philip O'Toole 088a06bfc9 Try simple way to share build information 3 years ago
Philip O'Toole 697132a6ee Remove metadata from Join operations
It's no longer needed.
3 years ago
Philip O'Toole 0d533dfa4c Some cleanup 3 years ago
Philip O'Toole f939d33fe5 Remove Metadata concept from system
System testing passes.
3 years ago
Philip O'Toole 2cef5679b7 rqlited starts and stops fine 3 years ago
Philip O'Toole 30d4d63ebb System tests pass 3 years ago
Philip O'Toole 38b2abca84 Remove older TCP transport code
Still unclear about whether tn.Open() is required with new mux.
3 years ago
Philip O'Toole d237a13a59 Use muxed connection for Raft internode comms 3 years ago
Philip O'Toole 98a7b3d30e Minor cleanup for mux code 3 years ago
Philip O'Toole 662daa74cb Add CA cert support which was erroneously removed
This was clearly a mistake due to a previous code change.
3 years ago
Philip O'Toole 2a55f98af7 Tweak help message for source IP
https://github.com/rqlite/rqlite/issues/774
4 years ago
osxlinux 03e616d1f7 fix: Optimize the Conversation from O\'Toole 4 years ago
osxlinux 3ba5e31fb2 feat: Support to specify the source IP when you are in a complex network environment 4 years ago
Philip O'Toole 2c52d9726c Log launch command 4 years ago
Philip O'Toole c782b43f2d
Build on-disk databases in-memory first
With this change, rqlite nodes running in "on-disk" mode build the database in memory first, and move it to the disk just before the Raft system starts. This means that on-disk nodes now initialize almost as quickly as in-memory nodes.
4 years ago
Philip O'Toole c4ee9cafd9 Disable TLS v1.0 and v1.1 by default 4 years ago
Philip O'Toole 5295a0e6b1 Trivial cleanups 4 years ago
Philip O'Toole b27cdfbf4d Better control over waiting for leader 4 years ago
Philip O'Toole 6670a22850 Actually check error codes during Store startup
This was a bug.
4 years ago
Philip O'Toole f07c3673c5 Log at start-up first and last Raft log indexes 4 years ago
Philip O'Toole 499df692be Exit if arguments are passed after data directory
Fixes issue #718.
4 years ago
Philip O'Toole a40338b113 Tweak log output 4 years ago
Philip O'Toole d5322a1909
Ignore join request if node already part of cluster (#711)
rqlite used to work like this, but suffered a regression due to a change in how Hashicorp Raft worked. The manner it changed in was not public, so relying on it was always fragile.
4 years ago
Philip O'Toole 6575de779d
Use Protobuf for encoding Raft Log commands
This PR changes Raft Log Entry encoding from JSON to Protobuf. Furthermore, larger Raft commands (which can result from batching SQL statements, or individually long SQL statements) are compressed before encoding.

This primary reason for this change is to reduce IO load since that is one of the largest performance bottlenecks. It will also reduce internode traffic.

Legacy JSON-encoded commands are still handled by this code, so this change is backwards-compatible with previous releases in the v5 series.
4 years ago
Philip O'Toole b6ebdf3ab1 Support setting Leader Lease timeout 4 years ago
Philip O'Toole fbdbee3e25 Include API proto in node meta 4 years ago
Philip O'Toole 3f0182c8e8 Make num join attempts and interval configurable 4 years ago
Philip O'Toole 487c0e3f8c Set Snapshot Interval to non-zero value
Snapshotting was *never* functional due to the zero interval value.
5 years ago
Philip O'Toole 536cac4fdf Allow log level control for Raft module
Default log level is INFO.
5 years ago
Philip O'Toole 668720cbb6
Remove obsolete SQLite const 5 years ago
Philip O'Toole ef44c199aa
Update main.go 5 years ago
Philip O'Toole cc65e36fcc
Remove obsolete const 5 years ago
Philip O'Toole 81f5f6faf1 Add support for non-voting nodes
A non-voting node doesn't participate in Raft consensus, but does
subscribe to the committed log entries originating with the leader.
This means a non-voting node keeps up-to-date with the state machine,
without impacting write-latency. These non-voting nodes can provide
read scalability for the cluster.
5 years ago
Philip O'Toole 3b9aca29c2 Add features list to status output
This will make it easier for client libraries to check for features in a given server, in a standard way.
5 years ago
Philip O'Toole f57ace7da2 Broadcast Store meta via standard consensus
With this change the cluster metadata (arbitrary key-value data associated with each node) is now broadcast across the cluster using the standard consensus mechanism. Specifically the use case for this metadata is to allow all nodes know the HTTP API address of all other nodes, for the purpose of redirecting requests to the leader.

This change removed the need for multiplexing two logical connections
over the single Raft TCP connection, which greatly simplifies the
networking code generally.

Original PR https://github.com/rqlite/rqlite/pull/434
5 years ago
Philip O'Toole 853133ecb2 By default use Raft network address as node ID 5 years ago
Philip O'Toole 8a0e1ce8f0 Move to Hashicorp Raft v1 5 years ago
Philip O'Toole 9499a7f92d Revert changes to Disco client 5 years ago
Philip O'Toole de379a883c When joining try HTTPS if HTTP fails 5 years ago
Zac Medico f01e6b1b0a
Server -http-ca-cert and -node-ca-cert options
The -http-ca-cert and -node-ca-cert options allow the user to specify
trusted X.509 root CA certificates as an alternative to the
-http-no-verify and -node-no-verify options. This behavior is analogous
to the rqlite client -ca-cert option.
5 years ago
Philip O'Toole 2e91858e1e Allow Raft election timeout to be set 6 years ago
Philip O'Toole 6937a377ae Allow control of shutdown-on-remove
Defaults to leaving Raft run if the node is removed.
6 years ago
Philip O Toole c1e1509b93 Correct rqlite GoDoc 7 years ago
Philip O Toole 3fcc5d36f6 Refactor credential store instantiation
This will make it easier for other services to use the credential store.
7 years ago
Philip O'Toole aa998db89e More GoDoc 7 years ago
Philip O'Toole 1a11536495 Include Go runtime version when issued -version 7 years ago
Philip O'Toole c8fb4dc9cf Fix HTTP x509 key help 7 years ago
Philip O'Toole d753a8f7be HTTP service now supports registered statuses
Mux is first service to register status for serving.
7 years ago
Philip O'Toole 75cec9a9c1 Tweak start-up logo
Strictly speaking the system is rqlite, not rqlited. The latter is just
the daemon.
7 years ago
Philip O'Toole ebfa38d726 Move to clearer command-line options 7 years ago
Philip O'Toole 5e2718d7f7 Better TLS-related logging 7 years ago
Philip O'Toole a0753d9968 Unit test TLS mux 7 years ago
Philip O'Toole 8f8894bd0e Complete node-to-node encryption 7 years ago
Philip O'Toole b96220f1eb Better commenting 7 years ago
Philip O'Toole ba53bde877 Add creation TLS-enabled listener 7 years ago
Philip O'Toole ece0994057 Command-line options for secure internode comms 7 years ago
Philip O Toole 6e664b9797 Log Go version at startup 8 years ago
Philip O Toole 57495a8457 Support multiple join addresses 8 years ago
Philip O Toole 299f5dee7e Tweak rqlite description 8 years ago
Philip O Toole fb92953a88 const out the name 'rqlited' 8 years ago
Philip O'Toole 4fad2d22df Tweak join-related logging 8 years ago
Philip O'Toole 159da1b5e5 Check if join allowed before determining addresses 8 years ago
Philip O'Toole b1ddec679d Don't name variable after package 8 years ago
Philip O'Toole 0ae7425678 Disco service is capitalized in logs 8 years ago
Philip O'Toole acaa014b49 Merge pull request #286 from rqlite/fix_http_help
Tweak help output
8 years ago
Philip O'Toole 4b9220c107 More join logging 8 years ago
Philip O Toole abd24c75ec Tweak help output 8 years ago
Philip O Toole 144514f370 Tweak main log message 8 years ago
Philip O'Toole 218610822c Merge pull request #283 from rqlite/fix_main_log
main code should also log to stderr
8 years ago
Philip O Toole 4d145f8ac5 main code should also log to stderr 8 years ago
Philip O Toole 9d39d59a6c Fix join failure log message 8 years ago
Philip O Toole cf39350d62 Start fixing Discovery Redirects
The Go HTTP client does some automatic redirect handling, and the code needs to deal with this.
8 years ago
Philip O'Toole 7810c3470a Complete integration with Discovery Service 8 years ago
Philip O'Toole a61f05985b Supply HTTP advertised address to disco service 8 years ago
Philip O'Toole 35528928e2 Integrate cluster.Join with main 8 years ago
Philip O'Toole 8f9a26ed7b Add initial, more complex, join functions
Also, remove questionable check of join and disco.
8 years ago
Philip O'Toole b0abb64d62 Sart integration of disco service 8 years ago
Philip O'Toole caf1562a77 Add GOOS and GOARCH to --version output 8 years ago
Philip O'Toole e6d9a9dda8 Add build branch to -version output 8 years ago
Philip O'Toole 851f486ff8 Make waiting for logs optional 8 years ago
Philip O'Toole 03899af510 Set params on store before opening 8 years ago
Philip O'Toole 059ab0757b Allow Store to wait for initial logs to be applied
Better fix for issue #260.
8 years ago
Philip O Toole 5b0cc7bb98 Log GOOS and GOARCH at startup 8 years ago
Philip O Toole ae0d119d83 Allow Raft Apply timeout to be configurable 8 years ago
Philip O Toole 982fa54030 Not all queries begin with SELECT so pull check
Common Table Expressions can begin with WITH. This check was always dubious.
8 years ago
Tycho Andersen 326ca757d7 add an API for using custom raft.PeerStore/log.Logger
This is useful in case the server needs to store other metadata (e.g. auth
data) along side the peer list.

The logging bit is handy in case something has its own logging framework
that it wants to use.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
8 years ago
Philip O'Toole 39ebf50cb7 Remove explicit control of FK constraints
It's not clear whether it's the right thing to do, and FK constraints
can still be controlled via PRAGMA commands.
8 years ago
Philip O Toole c691b04dca Tweak usage output 8 years ago
Philip O'Toole 4cf39b626e Tweak logo 8 years ago
Philip O'Toole d7833c66c4 Set build variables default at declaration time 8 years ago
Philip O'Toole 9ad9c593fb Remove unreachable code 8 years ago
Philip O'Toole aa599a34e3 Use HTTP status codes, not magic numbers 8 years ago
Philip O'Toole 4a74e439e5 Join redirects now fully functional 8 years ago
Philip O Toole e11aa14b6e Support memory profiling 8 years ago
Philip O'Toole c40fff4d46 Support controlling FK constraints at startup
This was possible previously, but would need to be set everytime on
startup via the API. This change allows it to set at startup AND enables
foreign constraint checking by default.
8 years ago
Philip O'Toole 2982058a81 Support setting Raft heartbeat timeout 8 years ago
Philip O'Toole 8a05236768 Support configurable snapshot thresholds 8 years ago
Philip O'Toole 6f4814a4c3 Support pprof information over HTTP 8 years ago
Philip O'Toole 786a8b0464 Used resolved address when joining
It seems Hashicorp Raft only works in IP addresses, and joining with a
hostname caused the remove logic to cause all nodes to leave when one
node was instructed to leave.
8 years ago
Philip O'Toole 8975a4744d Dump full body on join error 8 years ago
Philip O'Toole 2c334d4f93 Allow SELECT-verification to be disabled
This is not recommended as it leaves the system vulnerable to changes
via the "query" endpoint.
8 years ago
Philip O'Toole 1c6ef1d84f Use Raft advertise address, if exists, during join 9 years ago
Philip O Toole 4a5402fc9a Allow HTTP advertise address to be set 9 years ago
Philip O'Toole f16b6ba55b Allow Raft address advertise (#115)
* Use resolved Raft address as API peer key

* Allow Raft advertise address to be set

* Better log message for mux

* CHANGELOG updates

* Unit test mux layer address advertise
9 years ago
Philip O'Toole c1e2ab90e4 Switch to in-mem database by default (#113)
With low-latency networks, this results in a noticeable performance
increase.
9 years ago
Philip O'Toole f115f6fbef Version is now 3 9 years ago
Philip O'Toole a35b877ba6 Publish peer before starting http service
This ensures the node is not accessible until it's completed its housework.
9 years ago
Philip O'Toole 78f652fcc2 Enable leader redirection
Not quite complete.
9 years ago
Philip O'Toole 3c02cbdc53 Actually start mux 9 years ago
Philip O'Toole fac48629bc Start initial integration of mux (#109)
Integrate TCP mux with cluster and store

This change allows any node, including followers, to use the Raft log to make changes to a cluster-wide state.
9 years ago
Philip O Toole 5aefda9983 Move to new rqlite org 9 years ago
Philip O'Toole e8c92e088c Don't join unless actually necessary 9 years ago
Philip O'Toole 888e80294d Actually close response body 9 years ago
Philip O'Toole 58ba3463b5 Always close response body during join 9 years ago
Philip O'Toole fb5e3c99d3 Bring system-testing into line with new DB layer 9 years ago
Philip O Toole 75ee23bdd9 Move URL normalization to http package
This function may be useful for leader-redirection.
9 years ago
Philip O Toole 659be46190 Add build time to status output 9 years ago
Philip O Toole 59cddcc2f7 Correctly indicate no auth enabled 9 years ago
Philip O'Toole 7fd7a9a385 Finish multi-node cluster testing 9 years ago
Philip O'Toole 4c36f8345c Create standalone auth module 9 years ago
Philip O Toole dce5e33016 Display logo on startup 9 years ago
Philip O Toole f94a10424c Check for failing auth on join 9 years ago
Philip O'Toole c1ad8c8ec1 Allow auth config to be set at command line 9 years ago
Philip O'Toole 3ccb97c98b Merge pull request #84 from otoolep/https_support
Add HTTPS support to API
9 years ago
Philip O'Toole 5fb2b0a658 Less precise version 9 years ago
Philip O'Toole 43195b37cd Allow node to accept insecure X.509 certs 9 years ago
Philip O'Toole f23cd8ef9c Support HTTPS API
API can now be secured with X.509 certficate and key.
9 years ago
Philip O'Toole aee03269db Tweak help output for -join 9 years ago
Philip O Toole 6cb929954b Trivial cleanup of main code 9 years ago
Philip O Toole 7d8980878b Allow join address with protocol
This is part of the work for issue #82.
9 years ago
Philip O'Toole b00084a771 Include commit information in version 9 years ago
Philip O'Toole 09eb50d2bb Support dumping version via command-line option 9 years ago
Philip O'Toole fa8c9b20c2 Add build information to status output 9 years ago
Philip O'Toole eba25cfda4 Allow build version to be set
In addition, log it at startup.
9 years ago
Philip O Toole 076a996a8b Support expvar data 9 years ago
Philip O'Toole b705de5240 Faulty leader redirection still disabled 9 years ago
Philip O'Toole 4524d014eb Leader redirection almost complete 9 years ago
Philip O'Toole faaaacd2a6 Remove reporting 9 years ago
Philip O'Toole 59052ec0b4 More status output 9 years ago
Philip O Toole ce0a2ce269 Usage and comment fixes 9 years ago
Philip O Toole 593719f86c Remove obsolete comment 9 years ago
Philip O Toole 9c02e1edb6 Make it easier to understand DSN 9 years ago
Philip O Toole 4ff67c2c90 Support in-memory databases 9 years ago
Philip O Toole 17aea81d75 Add Raft statistics 9 years ago
Philip O'Toole 48b6a469e3 Update main.go 9 years ago
Philip O Toole d0b4d6aa0a RWADME cleanups 9 years ago
Philip O Toole a583b70180 Enhance reporting so Hashicorp use is flagged 9 years ago
Philip O Toole 35803cdf75 Shutdown Store on exit 9 years ago
Philip O Toole a6cb950ff4 Allow DSN config at command line
It might still need to be richer, so end-users could specify an
in-memory SQLite database. Specifying a DSN would require the user
to supply the full path to the SQLite database. This is OK. However,
the code then needs to be able to parse out the path to the database
so it can remove it before start up.
9 years ago
Philip O Toole 2ebec9b973 Start adding support for snapshots
This shows that passing the database into the Raft module is probably
not going to work, since the database could be opened in two ways -
 directly at startup, and be completely restored from the log, or with
a combination of restoring from a snapshot, followed by the remaining
log entries. In both cases the database must be opened using the
requested DSN settings.

A detailed config object for controlling SQLite behaviour, is probably
best, and it should be passed to the Raft store on start up.

Finally, file-level copying of the SQLite file can only take place if
no transaction is in effect. This might be handled by the use of a
RWLock. The write-lock is taken during Execute() and Snapshot, but
the Read lock is taken during Query(). Unfortunately this may reduce
the concurrency of inserts and updates. Perhaps the Backup call on
the Go SQLite library might be better, but it might be slow.
9 years ago
Philip O Toole ab71c3bdd2 Execute working now 9 years ago
Philip O Toole d67957d16d Tweak DSN help output 9 years ago
Philip O Toole 3d277dd8fb Update help output for DSN override 9 years ago
Philip O Toole d70a9cb0ed Push database into Raft store
Allows the DSN to be fully set, if requested.
9 years ago
Philip O'Toole 73d880c93c Start support for SQLite DSN
This isn't complete, since it prepends the Raft directory to the
filename, which would break a DSN.
9 years ago
Philip O'Toole 875bb6ebf6 Raft clustering functional 9 years ago
Philip O'Toole 12aef34625 Start integrating actual SQLite support
Builds without error.
9 years ago
Philip O'Toole d7d46f79c0 Start refactor for Hashicorp
Heavily influenced by hraftd. rqlited builds without error.
9 years ago