571 Commits (8f680b6d2a39b553a5c090a0379f4dc23abc2bfd)

Author SHA1 Message Date
Sayan Nandan 1dfaa0e4a0 Switch to using `next_unchecked` 3 years ago
Sayan Nandan 831d84d65e Fix forwarding of buffer before query execution
This has the ability to introduce UB because advancing the cursor might
invalidate the source pointers obtained by `protocol::Parser::parse()`
That's why we only forward the cursor after the query has been
executed. This is absolutely fine because even if another query
packet has been buffered, we will only forward by the amount we read
and not anything more.
3 years ago
Sayan Nandan f1cf7e8796 Reduce `memcpy`s in Skyhash protocol impl
This commit does an extreme amount of `unsafe` work to reduce the amount
of data that is copied around. Previously, we:
1. Copied in from the buffer
2. Copied again when we did a ptr::read

This changes that to:
1. Zero-copies for operations that can operate on borrowed values
(i.e values by ref like GET, KEYLEN, ..)
2. One copy for operations that need owned values

Overall, this may not immediately seem beneficial for small queries
(afterall, computer memory is very fast), but for large keys -- this can
make a very significant difference. However, a big difference can be noticed
in memory usage under heavy load (with as much as a tenfold drop in some
cases).

But to make this possible, we have to break free from Rust's borrowing
rules as we can't normally pass around refs easily. So, we just turn
everything into raw pointers and operate on them directly. This is why
we introduce a significant amount of unsafe code.
3 years ago
Sayan 111d50b75e
Release v0.7.0 (#210)
* Simplify query gen in sky-bench and bump versions

* Upgrade to the latest driver version
3 years ago
Sayan Nandan cdc33b349e Fix wrong arg length being silently ignored
Where actions were supposed to report an action error, they silently ran
their significant part, ignoring the rest. This was fixed in:
- `DROP TABLE`
- `INSPECT KEYSPACES`
- `INSPECT KEYSPACE <ksid>`
- `INSPECT TABLE <entity>`
- `USE <entity>`

Tests for the same were added
3 years ago
Sayan Nandan 4ef28ea7e8 Upgrade deps 3 years ago
Sayan Nandan 76e0cf607c Switch `MPOP` to returning a `Typed Array`
This makes its behavior similar to that of the other mutating actions.
3 years ago
Sayan Nandan d744eaa2f6 Fix `HEYA` impl and add `HEYA` actiondoc
Also added heya echo test
3 years ago
Sayan Nandan c45bfd03c8 Fix critical bug in flush routine
When a new instance is created, we need to:
1. Create the tree
This ONLY creates the directories
2. Create the PRELOAD
This is critical because this is our check for a new instance
3. Flush the tables
This is important because we have never flushed the tables/ks before.
If we don't do this -- the server would fail to start with a
`directory not found` error.
3 years ago
Sayan Nandan 3bd34ae5c9 Merge branch 'model/tsymbol' into next 3 years ago
Sayan Nandan d7ac4ebe56 Fix inspect tests 3 years ago
Sayan Nandan a24e03da60 Use `TypedArray`s in inspect commands 3 years ago
Sayan 596b593526
Fix detection of invalid container name (#207)
* Fix parser allowing `$` in container name

* Fix query engine tests
3 years ago
Sayan Nandan 95504a8be6 Fix `FlatArrayWriter` impl and `mpop` tests
Update driver version
3 years ago
Sayan Nandan 2ed3335a1e Upgrade all interfaces to use the latest driver
Fix lskeys impl
3 years ago
Sayan Nandan e389ee7860 Simplify encoding checks across actions
Checking all encoding errors beforehand simplifies a lot of things for
us. At the same time, this saves a lot of bandwidth as we don't have to
write encoding errors for each element -- instead we just write one.
3 years ago
Sayan Nandan 3a6c48727b Upgrade all actions to use typed arrays 3 years ago
Sayan Nandan f7d64689a6 Use `TypedArrayWriter` for typed Skyhash arrays 3 years ago
Sayan Nandan 0d2cfc661c Use tsymbol to determine if binary or unicode
This enables clients to know whether they should expect binary data or
an unicode string.
3 years ago
Sayan Nandan dd12ea599e Take values by ref in `KVEngine` impl methods 3 years ago
Sayan Nandan ec10d3f962 Fix `pop` and `mpop` tests 3 years ago
Sayan Nandan fa2a4c2611 Add the `mpop` action and update the `pop` action 3 years ago
Sayan Nandan 1092bdfd65 Merge pull request #198 from skytable/storage/snapshotengine 3 years ago
Sayan Nandan 27a5562651 Don't panic on unimplemented pipeline query type
The return for inpsect table queries for Keymap model tables was fixed
3 years ago
Sayan Nandan 4ba70aa19b Remove ser/de implementations
These impls are no longer needed
3 years ago
Sayan Nandan 42f3251d2c Upgrade deps
Also added docs for Skymap
3 years ago
Sayan Nandan da8462eda3 Switch hasher implementation 3 years ago
Sayan Nandan 153f940ff6 Merge branch 'memory/improve-cmap' into next 3 years ago
Sayan Nandan c17e44ddf7 Fix Skymap borrowed iter impl 3 years ago
Sayan Nandan 9da0cdafee Upgrade interfaces to use Skymap 3 years ago
Sayan Nandan 3759992cf8 Add iterators 3 years ago
Sayan Nandan 7498add90c Add get, get_mut and entry methods to Skymap 3 years ago
Aaron Hill 28133ddc5f
Remove trailing semicolons from macros (#201)
This fixes warnings on the latest nightly.
See https://github.com/rust-lang/rust/issues/79813
3 years ago
Sayan Nandan db60133dc3 Add basic Skymap methods 3 years ago
Sayan Nandan bb19d024ea Ignore errors in run loop
This fixes CVE-2021-37625
3 years ago
Sayan Nandan 8b7de7173e Use flocks for pid file to enable auto release
This can help in situations where the process is forcefully terminated.
3 years ago
Sayan Nandan 891f9a2e06 Remove unused deps
Also simplified new instance check
3 years ago
Sayan Nandan 5a0d3017a5 Support non-interactive TLS passphrase input 3 years ago
Sayan Nandan d54652c21e Fix config not parsing `false` in ssl.only key 3 years ago
Sayan Nandan bb14b62805 Reduce disk accesses with a trip switch 3 years ago
Sayan Nandan 0d3bfe486e Use specialized result type for strong actions 3 years ago
Sayan Nandan 252dd9c08d Add supdate concurrency tests
Also added changelog entry
3 years ago
Sayan Nandan 39856cdfd5 Add sset concurrency tests 3 years ago
Sayan Nandan a8b716c892 Add sdel concurrency tests 3 years ago
Sayan Nandan 62b58f1a9f Decompose strong actions' snapshotting core 3 years ago
Sayan Nandan b47fcc2c88 Use snapshot isolation for strong actions
This makes strong actions far more reliable than the previous
implementation.
3 years ago
Sayan Nandan 2d5d32216c Add some general borrow optimizations 3 years ago
Sayan b6fcb4c035
Add `drop keyspace <name> force` (#192)
* Add forceful dropping of keyspaces

This commit also improves the reliability of `drop keyspace` in general

* Add changelog

* Add tests for `force_drop_keyspace`

* Upgrade deps
3 years ago
Sayan Nandan e32b3e8ea1 Destructure methods in `BorrowedEntityGroup` 3 years ago
Sayan Nandan 69df98c69a Only copy into `ObjectID` for `create table` 3 years ago