1146 Commits (6a01d9d513b86077e7342d2095afcd90c770d83c)

Author SHA1 Message Date
Sayan Nandan 5d527408cd
Fix number decode algorithm for signed numbers
Also added preliminary tests for the same
2 years ago
Sayan Nandan dae3faf87d
Implement insecure lexer 2 years ago
Sayan Nandan 5a7145fa40
Implement parameterization and remove unsafe literals
Also refactored tests for clarity
2 years ago
Sayan Nandan 79050e5fff
Rename `UnsafeLit` to `SafeLit`
This is more logical due to the inherent meaning of `unsafe`
2 years ago
Sayan Nandan bd0c06652c
Use `where` clauses by default for DML queries
Along with this, here's a summary of other changes:
- `RawSlice` now uses `NonNull` to help the compiler with size opts
- The lexer now allows case insensitive keyword usage (I still DO NOT
particularly approve of it, because enforcing is important)
2 years ago
Sayan Nandan 2dec28d989
Add `where` clause parsing 2 years ago
Sayan Nandan cac7bd4860
Add new keywords 2 years ago
Sayan Nandan 7e5e2838cc
Add support for relational expressions 2 years ago
Sayan Nandan ddba886a0f
Add operating modes 2 years ago
Sayan Nandan d1cba5d8b4
Support signed integers 2 years ago
Sayan Nandan 9d51dc70fe
Make sure we accept all literal types in queries 2 years ago
Sayan Nandan 986cb26ebd
Support `null` in dict and tymeta 2 years ago
Sayan Nandan 173832dd13
Add benches for `drop` 2 years ago
Sayan Nandan c36693afd5
Add benches for `use` and `inspect` 2 years ago
Sayan Nandan 5711fd1089
Improve DDL query parsing
Summary of changes:
- Remaining query parse methods that directly used the `Compiler` were
modified to use token streams instead
- `Entity::parse_from_tokens` to fix assignment to counter instead of
increments
- Allow entity in `drop model`
- `alter model` and `alter space` directly handle space/model names
instead of depending on passing value via args
- Tests added for `drop` and `inspect`
2 years ago
Sayan Nandan 89c6035367
Fix some DDL query implementations
Summary of changes:
- The `drop` queries now use the `DropItem` for drop definitions
- `create model` is now entirely handled by the function in `schema`
- `create space` is now entirely handled by the function in `schema`
- Tests were added for drop (they were never present before)
2 years ago
Sayan Nandan 05b8fe81c0
Add basic benches for `ql`
The benches for the protocol were fixed as well.
2 years ago
Sayan Nandan db35f8a31b
Fix update to allow single entities to be passed 2 years ago
Sayan Nandan 943125116b
Add parsing for delete queries 2 years ago
Sayan Nandan a1c85fb305
Add parsing for update queries 2 years ago
Sayan Nandan ee7196d499
Add parsing for select queries 2 years ago
Sayan Nandan fe3e20ffd7
Fix fuzz tests and use custom uninit structure 2 years ago
Sayan Nandan f695051826
Add parsing for insert statements 2 years ago
Sayan Nandan f69ec88354
Use `Token!` for token shorthand 2 years ago
Sayan Nandan 2d1fdd3417
Keep `UnsafeLit` as a `Lit` variant
Per our language specification, unsafe literals are by their inherent
name literals, hence keep them under this variant. Also, it simplifies
a bunch of implementations. Although I'm sure we can do something for
performance to simply provide an error case when we encounter a
disallowed literal.
2 years ago
Sayan Nandan 9c28c97830
Support unsafe literals 2 years ago
Sayan Nandan e580f2b8d8
Add full support for map-based insert syntax 2 years ago
Sayan Nandan 132633c542
Add tuple syntax parsing 2 years ago
Sayan Nandan 68ed434c96
Add complete list support 2 years ago
Sayan Nandan 7ecec7ffa6
Add inspect statements 2 years ago
Sayan Nandan deed013648
Fix entity parsing 2 years ago
Sayan Nandan 7a5b958402
Support reset syntax 2 years ago
Sayan Nandan 700204913a
Enable adding fields using `alter model` 2 years ago
Sayan Nandan a84bb28a6a
Avoid pointless allocations for DDL operations 2 years ago
Sayan Nandan 70754cbb4d
Support field removal in alter model 2 years ago
Sayan Nandan 500bfc353d
Add field-dict expression syntax 2 years ago
Sayan Nandan efcc89d984
Enable altering of spaces 2 years ago
Sayan Nandan 9d5f85374b
Fix equality checks 2 years ago
Sayan Nandan 36a2b0162f
Enable creating spaces 2 years ago
Sayan Nandan 779fbb7785
Add parsing of schemas 2 years ago
Sayan Nandan a75df3a1d7
Add field parsing 2 years ago
Sayan Nandan 185df7a829
Add field property parsing 2 years ago
Sayan Nandan 71a9ceb093
Add `NULL` and `PRIMARY` keywords 2 years ago
Sayan Nandan e8aaccdb32
Improve kw/sym matching algorithms 2 years ago
Sayan Nandan d0a548a59a
Add fuzzing for layers 2 years ago
Sayan Nandan 1d69751ccf
Add fuzzing for tymeta 2 years ago
Sayan Nandan e7170b1a54
Add fuzzing for tokens 2 years ago
Sayan Nandan 3b5bcdde4b
Fix litnum parsing 2 years ago
Sayan Nandan 659ed8f6d9
Add tests for layers 2 years ago
Sayan Nandan a48da8b0ca
Add tymeta tests 2 years ago
Sayan Nandan 8ffe6360df
Simplify states 2 years ago
Sayan Nandan 103553ef20
Add type folding algorithm 2 years ago
Sayan Nandan 707f5c4d7e
Add type metadata parsing 2 years ago
Sayan Nandan e7e799aca7
Re-implement dictionary folding algorithm 2 years ago
Sayan Nandan 7d982a78bf
Add dictionary folding from tokens 2 years ago
Sayan Nandan 9d0486452f
Implement basic AST, add tests and fix lexing 2 years ago
Sayan Nandan a14e4cce3a
Add `Lexer` impl and `TypeDefintion` expr 2 years ago
Sayan Nandan 7041dd6ce3
Upgrade deps 2 years ago
Sayan Nandan 4d8e53f5cc
Cleanup and upgrade deps 2 years ago
Sayan d156347bc4
Re-implement network stack (#279)
* Re-implement network stack

This commit does a complete overhaul to the networking subsystem, and this has
been pending for a long time. For whatever reason, when some generic
flexibility was aimed for, we went ahead with the "expensive emulation" of
async traits which has resulted in unnecessary complication with type arguments
(lifetimes, function signatures looking insane et cetera) besides the usual
downsides.

Also, the termination signaling mechanism was slightly excessive because it was
built with the idea of supporting PUB/SUB by default.

Last but not the least, the authentication system used dynamism which had
resulted in unwanted complication to type arguments for functions that accepted
the auth handle. Now, none of those complications exist and we have an almost
glorious life (for now atleast).

* Fix simple query header for Skyhash-1.0
2 years ago
Sayan Nandan 166208cbb7
Use aligned pointer for zero-sized slice
This ensures that we always have an aligned pointer, even
when the slice is zero sized. This is required for enum
optimizations (as noted in from_raw_parts).
2 years ago
Sayan 8b45dcd96f
Switch implementation for shared in-memory data (#278)
* Switch to using `SharedSlice`

Although I'm a huge fan of case-based optimizations, we don't exactly need the
sophistication that `Bytes` gives us. Instead, we switch to a traditional ref
counted structure, which allocates on creation and deallocates when it is the
only owner (bytes also does this albeit using dynamic dispath via a vft).

The same function path is utilized for every operation on the structure. The
difference between heap-allocating the shared state and having it as fields
on the base structure is a micro-optimization that I'm yet to substantiate
with performance gains.

* Add tests for `SharedSlice`
2 years ago
Sayan 2180818dca
Fix erroneous removal of auth table during tree cleanup (#277)
* Fix erroneous removal of auth table during tree cleanup

When it comes to the handling of system tables, the current storage engine has
a little "funk." It is because the limited flexibility of the format prevents
us from directly storing system tables which have a different structure than
ordinary user created tables; this is why when the cleanup is run, previously,
the dummy keyspace created for the PRELOAD was scanned and since it has nothing
any "alien" file in the `ks/system` directory was purged. This commit fixes
that and ensures that we do not clean up the system directory.

This is also another reason why a new storage engine coupled with a new memory
engine are being developed. These shortcomings will be addressed with the new
engines.

* Add test case for issue #276

Add Changelog entry
2 years ago
Sayan Nandan a512b8b617
Upgrade deps 2 years ago
Sayan Nandan 9372e3aeeb
Upgrade deps 2 years ago
Sayan Nandan d2d340b760
Enable use of newlines and tabs in BQL 2 years ago
Sayan Nandan 081f8691f4
Bump deps 2 years ago
Sayan Nandan 0b5b978e81
Use stdlib for core count and upgrade deps 2 years ago
Sayan Nandan 0df1acd2be
Simplify imports 2 years ago
Sayan Nandan 3c321669fc
Upgrade deps 2 years ago
Sayan 5411b3b16b
Merge pull request #265 from skytable/ql/blueql
Implement BlueQL for DDL
2 years ago
Sayan Nandan c074656c7a
Error on extra args 2 years ago
Sayan Nandan b78258289c
Fix issues with commas 2 years ago
Sayan Nandan 3a47928773
Add tests and hints 2 years ago
Sayan Nandan e7f40c575a
Use BlueQL for all DDL operations
All tests for the same were updated
2 years ago
Sayan Nandan aa30822f0e
Support use statements 2 years ago
Sayan Nandan 81eb5823b4
Simplify lexing operations 2 years ago
Sayan Nandan bbc8f8f197
Improve invalid litnum errors 2 years ago
Sayan Nandan e64fd12ab4
Add more lexer tests 2 years ago
Sayan Nandan 174bd6c098
Ensure system is healthy before running DDL queries 2 years ago
Sayan Nandan 9e2f5b9258
Disallow named fields with the model API 2 years ago
Sayan Nandan 8b6268e7eb
Fix returns 2 years ago
Sayan Nandan 7a2c3e42cf
Support inspecting models with BQL 2 years ago
Sayan Nandan 56041116de
Support inspecting tables in spaces 2 years ago
Sayan Nandan d3bc4b7a92
Support inspecting spaces with BQL 2 years ago
Sayan Nandan a6f08ef559
Enable query execution with BlueQL 2 years ago
Sayan Nandan f791fb32a3
Ensure `PartialEq` safety for `RawSlice` 2 years ago
Sayan Nandan 2c69f7509f
Bind statement to source buffer lifetime to prevent misuse 2 years ago
Sayan Nandan 55b506aff9
Support force dropping of spaces/models
Also fixed length check for entities
2 years ago
Sayan Nandan 58aea728fa
Ensure that fields are either completely untagged or entirely tagged 2 years ago
Sayan Nandan 5fbc1d2791
Check for volatile model property 2 years ago
Sayan Nandan 8291b71408
Ensure we allow unicode in quoted strings 2 years ago
Sayan Nandan 9d4f2d0da9
Support entities in drop statements 2 years ago
Sayan Nandan 8bd886fad6
Support inspect queries 2 years ago
Sayan Nandan 9f084c4bd2
Support quoted strings 2 years ago
Sayan Nandan f1b818906d
Support new entity syntax 2 years ago
Sayan Nandan b716365c96
Add full lex test for a create query 2 years ago
Sayan Nandan 1d0f98ee8e
Implement the BlueQL spec
I initially planned to implement a scanner-less parser, but however, the
complexity was unnecessary and the performance improvements were marginal.
With increasing language complexity, such a pipeline would become even more
complex and hence, I re-implemented the parser with a traditional "proven"
lexer-parser pipeline. More performance improvements are possible, and I
will add them ahead.
2 years ago
Sayan Nandan a98b2b9247
Simplify cursor operations 2 years ago
Sayan Nandan 91704da4aa
Add docs 2 years ago
Sayan Nandan e34e5c87ca
Rename `Scanner` to `QueryProcessor` 2 years ago
Sayan Nandan 08a286d543
Ensure whitespace is skipped 2 years ago
Sayan Nandan 2434170ede
Add support for nested type expressions 2 years ago
Sayan Nandan 53fcecbb62
Add support for types 2 years ago
Sayan Nandan bc3694dd0c
Add punctuation support 2 years ago
Sayan Nandan 979c427d3a
Add support for escaped quoted strings 2 years ago
Sayan Nandan b14ca8e97c
Add string literal parsing 2 years ago
Sayan Nandan 42d59ee847
Account for numeric lit overflow 2 years ago
Sayan Nandan bea99c1e25
Add numeric literal parsing 2 years ago
Sayan Nandan f9c7a09f43
Add minimal lexing 2 years ago
Sayan Nandan 26645c93ab
Add token definitions 2 years ago
Sayan Nandan 3927940afd
Add `Scanner` 2 years ago
Sayan Nandan a819196dbd
Simplify COW semantics 2 years ago
Sayan Nandan 06764d3462
Make `UnsafeSlice::as_slice` unsafe to call
In an earlier commit we marked `as_slice` as safe to call, stating
that only construction is unsafe. However, that is incorrect. The
ctor of `UnsafeSlice` does nothing unsafe, unless we make as_slice
safe. However, since the type is not bounded to any lifetime,
making `as_slice` safe to call assumes a very "rarely true"
safety contract: that the pointers are valid throughout the
execution of the program, id est they are static.

However, that assumption is entirely incorrect for our use case,
hence I'm marking this as `unsafe` again.
2 years ago
Sayan Nandan e495172f2f
Upgrade deps 2 years ago
Sayan Nandan b3b236d9aa
Guard against allocation errors in `libstress` 2 years ago
Sayan Nandan 36b3fc0ee8
Add docs for binary crates and upgrade deps 2 years ago
Sayan Nandan 669eca3ff7
Increase shard count and remove redundant impls 2 years ago
Sayan Nandan d4c10bee80
Upgrade deps and bump version 2 years ago
Sayan Nandan 4a0cc3579e
Upgrade deps 2 years ago
Sayan Nandan d4dcd7b127
Upgrade deps and ignore tree test on M1 builder
For some spurious reason, the tree test is failing on the M1
builder; so we'll hack around by ignoring the test when run
on the M1 CI. Note to self: the test runs successfully on
a physical M1 machine so it is likely that this is a problem
with the runner.
2 years ago
Sayan Nandan 31bdc83108
Make auth errors generic over protocol 2 years ago
Sayan Nandan 89067c1fd5
Revise trait definitions 2 years ago
Sayan Nandan 231dd53341
Reduce code redundancy by using `RawParser` and `RawParserExt`
Also added changelog
2 years ago
Sayan Nandan 20f039cb85
Enable setting protocol version in configuration 2 years ago
Sayan Nandan b5e0f68c88
Add support for Skyhash 1.0 2 years ago
Sayan Nandan 7ec599edcb
Update bench suite for protocol
Turns out that the original PR implementing Skyhash 2.0 did not
update the benchmark code.
2 years ago
Sayan Nandan 67b19602b9
Make all responses/groups generic over protocol 2 years ago
Sayan Nandan b047845cc5
Upgrade all interfaces to be generic over protocol 2 years ago
Sayan Nandan 9c15e100c8
Add metaframe methods to `ProtocolWrite` 2 years ago
Sayan Nandan 2bb7555e4e
Add `ProtocolWrite` trait for writing data according to `ProtocolSpec` 2 years ago
Sayan Nandan d31fc5855d
Add memory safety assertions 2 years ago
Sayan Nandan 02a3e9b4e9
Make connections generic over protocols 2 years ago
Sayan Nandan b2e130626f
Simplify types 2 years ago
Sayan Nandan 0e432e8761
Upgrade deps 2 years ago
Sayan Nandan 3b97c9528f
Remove redundant methods 2 years ago
Sayan Nandan 879e20f6ca
Upgrade all interfaces to use the new protocol 2 years ago
Sayan Nandan a018b76f40
Ensure empty payload is allowed
Bump Skytable driver git revision to ensure builds don't fail
(possibly a force push).
2 years ago
Sayan Nandan ec24b2caad
Fix segfault due to uninitialized elements in heap array 2 years ago
Sayan Nandan 3b918ff828
Add more tests 2 years ago
Sayan Nandan 71dcfb7efc
Fix server not exiting due to infinite `read_buf` loop 2 years ago
Sayan Nandan c065ed61e3
Add complete query parsing impl 2 years ago
Sayan Nandan c2ddb9b2db
Add more `read_usize` tests 2 years ago
Sayan Nandan dec82cd400
Add `read_line_pedantic` for non-empty lines 2 years ago
Sayan Nandan 3731143831
Add tests with excess bytes 2 years ago
Sayan Nandan 7f3d3cb05e
Add `usize` parsing 2 years ago
Sayan Nandan 59c681e787
Fix `read_line` impl and tests 2 years ago
Sayan Nandan 55a01b172c
Add tests for `read_until` 2 years ago
Sayan Nandan 400ca13d10
Add tests for `not_exhausted` 2 years ago
Sayan Nandan a17d77bf9e
Fix tests 2 years ago
Sayan Nandan 2c2a236501
Add parserv2 basic impl 2 years ago
Sayan Nandan 7ab9bbe8e0
Upgrade deps 2 years ago
Sayan Nandan c984bd2e1b
Ensure Windows entity names are sanitized 3 years ago
Sayan Nandan df994cf4f7
Add `sys metric storage` for checking on-disk storage usage 3 years ago
Sayan Nandan d201c74150
Remove PID file just before exit
Also upgrade GHA caching dep and fix imports that rustfmt
messed up.
3 years ago
Sayan Nandan 7a354a9acb
Improve server shutdown heuristic and fix Windows path evaluation 3 years ago
Sayan Nandan 72304195d1
Use proc macro for correct compile-time response generation 3 years ago
Sayan Nandan 2c6768dc12
Ensure snapshot overwrite protection if host time is incorrect 3 years ago
Sayan Nandan 0e10f2cb5f
Fix remote snapshots with same names being overwritten 3 years ago
Sayan Nandan 076282df2b
Add tests for snapshot directory structure 3 years ago
Sayan Nandan e5909eb1f9
Use separate flag for tree cleanup 3 years ago
Sayan Nandan 9374404551
Add persist tests for keyspace creation/deletion 3 years ago
Sayan Nandan 08cffa1d3f
Fix bug causing bgsave/termsig flush failure if a snapshot flushed it
I came across an interesting scenario that led to the discovery of this bug:
if a keyspace is created before a snapshot cycle and before termsig/bgsave,
and then the snapshot cycle runs, then the subsequent runs of bgsave/termsig
would fail. The reason behind this interesting bug turns out to be rather
trivial.

Since the `flush_full` routine, regardless of storage targets would untrip
the PRELOAD switch, the snapshot target as expected untrips the switch. Now,
this means that a tree re-init is not run by BGSAVE or save on termsig.
As a consequence, while attempting to run bgsave/save on termsig, the new
keyspace directories are not found, resulting in flush failure. This commit
fixes it my simply checking if the target should untrip the switch or not.

Tests for the same were added
3 years ago
Sayan Nandan c4eaf3d182
Bump version [skip ci] 3 years ago
Sayan Nandan 5002fed675
Fix pipeline with pedantic execution for stages 3 years ago
Sayan Nandan 5054adc33c
Add sys action tests 3 years ago
Sayan Nandan 832da79e9d
Add sys actions 3 years ago
Sayan Nandan 0283d91f67
Fix panic resulting from corrupted metadata in `PARTMAP` 3 years ago
Sayan Nandan 0b17f7b0e4
Fix new instance detection 3 years ago
Sayan Nandan 0e7340c965
Fix LF check in protocol impl 3 years ago
Sayan Nandan d57b0d98cf
Improve error reporting infrastructure
This commit greatly improves the error reporting infrastructure
all across the `skyd` crate. Now, every error has far more
context making it easier to debug and test while also providing
helpful feedback to users. This feedback can be extremely helpful
to find out offending files and fix them; for example, by being
specific about which file is corrupted or has bad metadata.
3 years ago
Sayan Nandan f9b997c1f1
Avoid verbose logging in test harness 3 years ago
Sayan Nandan cc6a1b7f27
Enable pushing multiple elements into list at once 3 years ago
Sayan Nandan 14d9eb4bac
Clean up code
Fixed Windows tests and also applied recent clippy suggestions
3 years ago
Sayan Nandan cd1accd646
Simplify command assembly 3 years ago
Sayan Nandan 6234018077
Wait for servers to start/shut down instead of waiting blindly 3 years ago
Sayan Nandan f40c1d00e5
Add `auth whoami` 3 years ago
Sayan Nandan 82420e2013
Enable inspecting the current table 3 years ago
Sayan Nandan ced5e75182
Enable inspecting current keyspace 3 years ago
Sayan Nandan b099dd1825
Add missing respcode output impls 3 years ago
Sayan Nandan b057de94e6
Bump version to 0.7.4 3 years ago
Sayan Nandan 90ef10a56d
Fix snapshot engine init failure 3 years ago
Sayan Nandan c80d929cf9
Ensure `AuthID`s are ASCII-only and add actiondoc for `listuser` 3 years ago
Sayan Nandan ad2f87de7a
Add `auth listuser` subaction 3 years ago
Sayan Nandan 37ba222428
Upgrade deps 3 years ago
Sayan Nandan c7ae4b69e5
Add auth persistence tests 3 years ago
Sayan Nandan f446feaac6
Add persistence tests for lists 3 years ago
Sayan Nandan 1dbba0c06e
Add persistence suite for keymap string table types
Also fixed persistence bug with tables in the `system` keyspace
3 years ago
Sayan Nandan 14966f6972
Fix missing `system` ks on second boot of server 3 years ago
Sayan Nandan 369f7b89ed
Enable table access using partial entity syntax 3 years ago
Sayan Nandan d30bc38fbe
Enable `auth restore` for anonymous users and add tests 3 years ago
Sayan Nandan 482f4009db
Enable regenerating tokens and fix panic on wrong length `AuthID` 3 years ago
Sayan Nandan 7dedb37a12
Fix auth error respstring lengths 3 years ago
Sayan Nandan 97112c4b51
Add actiondoc for auth 3 years ago
Sayan Nandan 5681e5ec53
Simplify `KVEngine` impl 3 years ago
Sayan Nandan 3cbe7c981c
Ensure TLS-only mode in prod when authn is enabled
Also updated configuration template
3 years ago
Sayan Nandan 426948f8d5
Upgrade deps 3 years ago
Sayan Nandan 88955b62c6
Add changelog and remove unused code 3 years ago
Sayan Nandan f7a4281ed5
Add `auth` syntax checks 3 years ago
Sayan Nandan 58b3f0dda7
Add authn tests 3 years ago
Sayan Nandan 3c14501913
Simplify tests 3 years ago
Sayan Nandan f67057dfb5
Add authn tests 3 years ago
Sayan Nandan ade5b2a105
Enable authentication in dbtest tests 3 years ago
Sayan Nandan 4a075422de
Enable using TLS on dbtest tests 3 years ago
Sayan Nandan e62fb74e81
Simplify dbtest macros 3 years ago
Sayan Nandan bb978e5a84
Simplify uninit array generation
The previous method used was a dirty hack due to limitations with
expressions in constant contexts, but the latest `rustc` lets
us greatly simplify this impl.
3 years ago
Sayan Nandan 68e5e07450
Fix length checks in auth subactions 3 years ago
Sayan Nandan ff8bb08ab9
Fix `auth login` and `auth claim` impls for unauth connections 3 years ago
Sayan Nandan 6db1667420
Enable auth to be configured 3 years ago
Sayan Nandan d70a42fd10
Fix tests 3 years ago
Sayan Nandan d6fed47eae
Implement `login`, `logout`, `claim` and `adduser` for `auth` 3 years ago
Sayan Nandan 473f435638
Enable users to authenticate 3 years ago
Sayan Nandan 2a91eab273
Add `ActionError` impls for `AuthError` 3 years ago
Sayan Nandan 720764f5d2
Move system tables into separate namespace 3 years ago
Sayan Nandan 21d0e0a2b6
Version gate the storage engine 3 years ago
Sayan Nandan ffce889c00
Improve bytemark save/restore tests 3 years ago
Sayan Nandan 339e43928f
Add table restoration tests using bytemark 3 years ago
Sayan Nandan 2cf4ec5e87
Fix unflush for volatile tables 3 years ago
Sayan Nandan 380ba67cc6
Make unflush routines generic over keyspaces and tables 3 years ago
Sayan Nandan 8a1bf4b400
Optimize table flush/unflush routines 3 years ago
Sayan Nandan 6832c92775
Make flushing of keyspaces and tables generic over types 3 years ago
Sayan Nandan fa74a149b4
Fix tests 3 years ago
Sayan Nandan 8d7126994d
Fix `LocalSnapshot` and `RemoteSnapshot` implementations 3 years ago
Sayan Nandan 39726177cd
Simplify flush routines using `StorageTarget` 3 years ago
Sayan Nandan 652ae8d2f0
Reduce duplication in strong action test impls 3 years ago
Sayan Nandan d5e53eede0
Reduce duplication in `DdlError` handling 3 years ago
Sayan Nandan 750d054144
Don't unnecessarily obtain arc clones 3 years ago
Sayan Nandan 5d9ef41c31
Fix length checks
Also improve panic messages in `dbtest` tests.
3 years ago
Sayan Nandan 4c46ff3c2b
Simplify action error propagation 3 years ago
Sayan Nandan b59243eec1
Fix try_from_slice impl 3 years ago
Sayan Nandan 31d4cbb34d
Enable login and add login tests 3 years ago
Sayan Nandan 2fc77e0393
Use smaller size for random bytes
A sample space of 40 provides enough randomness so that the
likelihood of two tokens being the same is almost entirely
ruled out. And even if they are, it shouldn't be a problem
since they correspond to different accounts, although the
possibility itself is as good as impossible due to the
possible number of permutations being 8.560685103E+94, so
we can safely ignore this "risk".

40 is a sensible balance between what clients have to send
and the level of security we're expecting to provide, than
64 bytes.
3 years ago
Sayan Nandan c8ccfca09b
Implement `AuthProvider` 3 years ago
Sayan Nandan 3a6083b3f1
Add `AuthProvider` definition 3 years ago
Sayan Nandan 7285d63908
Simplify `Once` implementation 3 years ago
Sayan Nandan 6ed994fe19
Add `Once` implementation 3 years ago
Sayan Nandan 53d4c2b529
Use `TcpBackoff` in `SslListener` as well 3 years ago
Sayan Nandan d2e297e367
Use dedicated backoff algorithm for busy loops
Also use `util::exit_error` whenever possible to reduce
duplication.
3 years ago
Sayan Nandan 57f05e9788
Simplify TCP backoff impl 3 years ago
Sayan Nandan 96f817d31e
Simplify `resp` impls
The `RespCode` impl is no longer used, so it was removed.
3 years ago
Sayan e9620d0a8c
Release 0.7.3 (#238)
* Bump version

* Upgrade deps
3 years ago
Sayan Nandan 49fae295d1
Simplify termination signal handling
Yeah, signal handling is not one of the best things to do, and it
definitely is one of the messiest things to do. This commit
simplifies the way we handle "termination signals" which can be
SIGTERM or SIGINT on POSIX-compliant systems or can be Ctrl+C
or Ctrl+Break on Windows systems; whenever we receive any of these,
we'll attempt to terminate the database server.

Now, instead of waiting for multiple futures to complete, we create
a different `TerminationSignal` type that is a `Future`, which on
polling checks whether either of the signals have been received
or closed. We return the poll state for either.
3 years ago
Sayan Nandan ed66e4f291
Decrement threshold on first call 3 years ago
Sayan Nandan 0b87452b97
Listen to SIGTERM while in save-on-termsig retry loop 3 years ago
Sayan Nandan 2d6d776edc
Cleanup code and ensure strong_count of `Corestore` is 1
I suppressed some lints, but all of them will be removed very
soon. (use a TODO finder or something to see what all need to
be removed)
3 years ago
Sayan Nandan 33b0693fcb
Fix infinite loop on save failure during termination 3 years ago
Sayan Nandan 9b296cbf9b
Bump version 3 years ago
Sayan Nandan c961548b01
Upgrade deps and bump version 3 years ago
Sayan Nandan e9369a40ef
Simplify recipes 3 years ago
Sayan Nandan 0b54ea1cb3
Bump up version 3 years ago