1
0
Fork 0

276 Commits (348b49c7570e71dac51ef91d868f0af10a2a1746)

Author SHA1 Message Date
Philip O'Toole dbd1c0a254 Remove 'redirect' from HTTP status
Getting the redirect information requires accessing other nodes, which
could block if those nodes are not up.
3 years ago
Philip O'Toole f4e04e5bc5 Check nodes reachable in parallel 3 years ago
Philip O'Toole 805074f8f5 Start supporting /nodes endpoint 3 years ago
Philip O'Toole f939d33fe5 Remove Metadata concept from system
System testing passes.
3 years ago
Philip O'Toole 78f39a082e Fix HTTP unit tests
Add missing stub.
3 years ago
Philip O'Toole 2cef5679b7 rqlited starts and stops fine 3 years ago
Philip O'Toole 6a48068d78 Integrate Cluster service with HTTP service 3 years ago
Philip O'Toole f5cbc18a16 Add auth-ok and auth-fail events to stats 4 years ago
Philip O'Toole c4ee9cafd9 Disable TLS v1.0 and v1.1 by default 4 years ago
Philip O'Toole d560356d8d Fix spelling mistakes 4 years ago
Philip O'Toole ab2338733c Include more information with HTTP 500 4 years ago
Philip O'Toole f81d7e29d7
Enable http/2.0 support for TLS
As per https://blog.cloudflare.com/exposing-go-on-the-internet/
4 years ago
Philip O'Toole 56cb9321d2 End-to-end test of idempotent join 4 years ago
Philip O'Toole e948d7410a ABL 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 1a3d46994d Fix potential panic during request parsing 4 years ago
Philip O'Toole b4867713e4 Better variable name, Query -> SQL 4 years ago
Philip O'Toole 7bb3b8850d Support logging from writeResponse() 4 years ago
Philip O'Toole 8c2ecb046d Prepare some unit test for mixed params 4 years ago
Philip O'Toole 9e1cb231b5 Unit test /backup returns redirect 4 years ago
Philip O'Toole d473e64246 Unit test backup/ endpoint 4 years ago
Philip O'Toole 76358485a7 Explicitly handle "no leader" during backup 4 years ago
Philip O'Toole ee9f929735 ABL 4 years ago
Philip O'Toole f961bb4e44 Fix typos and comments 4 years ago
Philip O'Toole 142180bbe6 Fix load API
It uses plain text, not JSON.
4 years ago
Philip O'Toole ac862e4091 Add system test for parameterized statements
Fix some bugs along the way too.
4 years ago
Philip O'Toole 6e6f12fdd6 HTTP API now supports multi-format
If now supports an array of strings, as before, and also supports arrays
of arrays, where each inner array contains a statement, and parameters
for binding to that statement.
4 years ago
Philip O'Toole 69cc93646d More support for empty parsing 4 years ago
Philip O'Toole c9940ca9cf Add Parser for multi-format HTTP requests 4 years ago
Philip O'Toole bbc8681b4d Fix variable naming 4 years ago
Philip O'Toole b8ecc1b18e go fmt 4 years ago
Philip O'Toole 0d85f00b63 Test LeaderAPIAddr and LeaderAPIProto
To do this these functions needed to be made public.
4 years ago
Philip O'Toole 031fcbbde1 Correct comment 4 years ago
Philip O'Toole fbdbee3e25 Include API proto in node meta 4 years ago
Philip O'Toole c6419cc62e Check local HTTPS cert to enable HTTPS redirect
This assumes that if this node is using HTTPS, then all other nodes are.
This is required as per the documentation.
4 years ago
Philip O'Toole 188981005f Split out Queryable interface at Service level 4 years ago
Philip O'Toole e073a5f54f Fix comment 5 years ago
Philip O'Toole cb0f88a022
Factor out credential check (#624) 5 years ago
Philip O'Toole abb7772105 Support leader freshness with None consistency
This change allows the read request to specify the maximum time the node
receiving the request may have last heard from the cluster leader. It
only applies to a read consistency selection of None.
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 1ffc3d566e Add varadic functions to auth store 5 years ago
Philip O'Toole a23af88235 Write backup and dump files to a writer
This avoids making an extra copy in RAM. Port of original PR at
https://github.com/rqlite/rqlite/pull/461/.
5 years ago
Philip O'Toole c69ef51790 Remove debug line 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 a6f8f060fb Update CHANGELOG 5 years ago
Philip O'Toole e376812907 Add method to Store that returns leader ID
With the advent of Raft IDs, this distinction matters.
5 years ago
Philip O'Toole 8a0e1ce8f0 Move to Hashicorp Raft v1 5 years ago
Philip O'Toole 0e69be3949 Store layer supports generating SQL format backups
Port PR453.
5 years ago
Philip O'Toole 0471877f26 Abort transaction if load operation fails 5 years ago
Philip O'Toole 33f6f6bf8e Move EnsureHTTPS into http module 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 efec4d4e42 Return redirect if remove on follower
Fixes issue #391.
7 years ago
Philip O Toole 00d24ce06d Reduce cyclo complexity 7 years ago
Philip O'Toole a0bf158111 Test 404 returned when Expvar and Pprof disabled 7 years ago
Philip O'Toole 272792fbef "status" permission required for Go runtime info 7 years ago
Philip O'Toole 2a1b6c65c3 New QueryRequest and ExecuteRequest types
The Query() and Execute() functions on the Store now take a complex type
that encapsulates the statements, and associated parameters. This will
make it easier to add more control parameters when making requests.
7 years ago
Philip O Toole 9d480c17c3 Make read consistency param case-insensitive 7 years ago
Philip O Toole 0ae3347345 Unit test redirect 7 years ago
Philip O Toole 346e11cd88 Include query params with 301 redirect URL 7 years ago
Philip O'Toole 5a6f344a7d Don't always set Content-Type as JSON (#334)
Set Content-type for backup endpoint to "application/octet-stream".
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 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
Philip O Toole e6f428fcd8 Convert magic string to const 8 years ago
Philip O Toole 2c8922b50b Standardize load endpoint processing 8 years ago
Philip O Toole 9e87a3ba30 Add new perm for loading SQLite dump file
This was missed in previous releases.
8 years ago
Philip O Toole 5ed6ef0ae8 Covert dumps to queries in HTTP service
There is no need for special logic at the Store level.
8 years ago
Philip O'Toole 210367b51b Fix call to Load() 8 years ago
Philip O'Toole 36368d6786 Start removing batch load 8 years ago
Philip O'Toole 68793cfcbb Use a transaction for loaded batch
Bump the batch size to 1000 too.
8 years ago
Philip O Toole 6270744584 Correct batch size variable name 8 years ago
Philip O Toole 12482c682d const out loader batch size 8 years ago
Philip O Toole 88eb56e431 Service now uses load batch of 100 8 years ago
Philip O Toole 31560160a1 Check FK state before load 8 years ago
Philip O Toole 3286bf064d Start adding load-from-dump 8 years ago
Philip O'Toole 4d36690eea Unit test "Content-type" HTTP header 8 years ago
Philip O'Toole 5b4b1e3567 Set Content-type "application/json" on responses 8 years ago
Philip O'Toole 729221bf57 join endpoint returns HTTP 301 if necessary 8 years ago
Philip O Toole 0198e31cbf Refactor adding build version to HTTP response 8 years ago
Philip O Toole 1152886216 Reduce Go cyclo complexity 8 years ago
Philip O'Toole 54cbd025e1 'go lint' fixes 8 years ago
Philip O'Toole 354c9588b9 Remove useless comment 8 years ago
Philip O'Toole bc60aa755d At least log any failure from HTTP Serve() 8 years ago
Philip O'Toole 9a0b9bcafe Update service.go 8 years ago
Philip O Toole 4b36f313ec Check unknown version support in HTTP 8 years ago
Philip O Toole 1b6bdffd33 Add rqlite version to each HTTP response 8 years ago
Philip O'Toole 6f4814a4c3 Support pprof information over HTTP 8 years ago
Philip O'Toole 918a3200dd Correct method for removal of node 8 years ago
Philip O'Toole 45427e82ad More Service route unit tests 8 years ago
Philip O Toole 0aff83dea8 Ensure the correct HTTP methods on endpoints 8 years ago
Philip O'Toole de6cc9ce12 Log full error on join failure 8 years ago
Philip O'Toole 37195abcf4 Expose /remove endpoint on HTTPD service 8 years ago
Philip O'Toole 3f467c6590 Merge pull request #129 from rqlite/force_select
Check that queries begin with SELECT
8 years ago
Philip O'Toole 9a36f4867a Check if queries start with SELECT 8 years ago
Philip O'Toole 8d7644f55a More 'go lint' fixes 8 years ago
Philip O Toole bf2047b45b 'go lint' fixes 8 years ago
Philip O'Toole 349300b743 Add Go runtime info to status output 9 years ago
Philip O'Toole 315439cc7f Fill our API peers lookups (#111)
* Fill our API peers lookups

* Complete leader-redirection

* Handle no leader for redirect
9 years ago
Philip O'Toole c04ff92d7a Fill our API peers lookups (#110) 9 years ago
Philip O'Toole 434116a704 Move to permanent redirects for leaders 9 years ago
Philip O'Toole 78f652fcc2 Enable leader redirection
Not quite complete.
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 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 24b326685d Unit test 401 logic 9 years ago
Philip O'Toole bc6275a759 Tweak comment for New HTTPD service 9 years ago
Philip O'Toole ad0b6f3b4d GoDoc fixes 9 years ago
Philip O'Toole 4c36f8345c Create standalone auth module 9 years ago
Philip O Toole 6b339284f8 Fix GoDoc typos 9 years ago
Philip O'Toole 511d2039c3 Fix "auth enabled" status logic 9 years ago
Philip O'Toole 559472cd9f Add "auth" state to status output 9 years ago
Philip O'Toole 5a01ffcda9 Return if username and password are invalid 9 years ago
Philip O'Toole 5cbeecddf5 'go fmt' fixes 9 years ago
Philip O'Toole c1ad8c8ec1 Allow auth config to be set at command line 9 years ago
Philip O'Toole 817cc2abc7 Integrate perms with HTTP service 9 years ago
Philip O'Toole 473d6e1979 'go fmt' fixes 9 years ago
Philip O'Toole 1262244b6a 'go vet' fixes 9 years ago
Philip O'Toole e638efe9cf HasPermRequest added 9 years ago
Philip O'Toole d92126a861 Add CredentialStore GoDoc 9 years ago
Philip O'Toole 49baa83ceb CredentialStore now stores perms 9 years ago
Philip O'Toole 90b5a79720 Check BasicAuth if enabled 9 years ago
Philip O'Toole 58887947c5 Credentials store can directly check a request 9 years ago
Philip O'Toole 3bfadcfbe7 Add simple credentials store 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 196e5c405f Comment corrections 9 years ago
Philip O'Toole fa8c9b20c2 Add build information to status output 9 years ago
Philip O Toole 5f5a666a06 Move to "weak" and "strong" for consistency levels 9 years ago
Philip O Toole ec3af02ba5 Basic HTTP stats to expvar 9 years ago
Philip O Toole 076a996a8b Support expvar data 9 years ago
Philip O Toole 7bf9b32425 Removed unused isExplain() 9 years ago
Philip O Toole 8433c2ef2f Fix http unit tests 9 years ago
Philip O Toole db1fb33fd3 Allow timing control
Fixes issue #75.
9 years ago
Philip O Toole 11c18cd769 Service and store support consistency levels
Fix issue #5.
9 years ago
Philip O Toole 959ceaecfa Use 'timings' instead of 'verbose' 9 years ago
Philip O'Toole 62c17291b4 More diagnostic information 9 years ago
Philip O'Toole ddad80be8c Start adding 'verbose' query param 9 years ago
Philip O'Toole 4524d014eb Leader redirection almost complete 9 years ago
Philip O Toole f28b315a8d 'go fmt' fixes 9 years ago
Philip O Toole 68719955e0 Prep for extensive service unit tests 9 years ago
Philip O Toole 6c12e39809 Require Store to expose Leader() 9 years ago
Philip O'Toole 77141ff193 Correct comment 9 years ago
Philip O'Toole e88f97ed06 Support cluster-level leader checks for queries 9 years ago
Philip O'Toole d294012814 Fix HTTP unit tests after new status route 9 years ago
Philip O'Toole 0607a69382 Only show backup time if it has occurred 9 years ago
Philip O'Toole 92329628cf More /status functionality 9 years ago
Philip O'Toole 59cdb6856c Rename 'statistics' route as 'status'. 9 years ago
Philip O Toole f1963221ca Small fixes and formatting 9 years ago
Philip O Toole cc73f0abbc Default to leader check before backup 9 years ago
Philip O Toole 947cd053be Don't set content-type header for backup
It was getting prepended to the body of the request, and corrupting
the database. It's set automatically anyway.

Backup now appears functional.
9 years ago