189 Commits (next)

Author SHA1 Message Date
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 426948f8d5
Upgrade deps 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 c8ccfca09b
Implement `AuthProvider` 3 years ago
Sayan Nandan 3a6083b3f1
Add `AuthProvider` definition 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 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
Sayan Nandan d550e0d7a7
Expect `noart` in production mode
This might make one think that we are being outrageously strict,
but at the end of the day, it can help investigate crashes
or inspect logs without artwork all over the place.

Following some discussions, the `user` mode was renamed to `dev`
mode.

This commit also upgrades some deps, other than clap which has
deprecated yaml support (we will continue to use 2.x).

Finally, the CHANGELOG was updated.
3 years ago
Sayan Nandan 85e789a1ee
Upgrade deps 3 years ago
Sayan 2cdabfc43e
Automatically package Debian packages on release (#235)
* Add debian package generation

* Install cargo-deb on `make deb`

* Reload systemd daemon on postinst

* Add auto upload for Debian packages

* Consider using runner.os for simplicity
3 years ago
Sayan Nandan 88a8095f42
Upgrade deps 3 years ago
Sayan Nandan c68d3ea3f4
Upgrade deps
All deps except for `clap` has been upgraded. Due to the removal of
the `args` field in `ArgMatches` in v3, and our dependence on the
field, we cannot upgrade to the latest version.

A PR has been created and once it is merged or a workaround
suggested, we can upgrade. (see clap-rs/clap#3265)
3 years ago
Sayan Nandan 1c16e43d3d
Upgrade deps 3 years ago
Sayan Nandan 7c9058a02e
Upgrade deps 3 years ago
Sayan Nandan 50eb183f46
Upgrade deps 3 years ago
Sayan Nandan 93d1004c80
Add changelog and switch to using rustc edition 2021 3 years ago
Sayan 76f493753b
Add the `whereami` action (#232)
* Move macros into module

* Add the `whereami` action to identify the current entity

* Show entity group in the skysh prompt

* Add tests and actiondoc for `whereami`

* Add changelog entry

* Upgrade deps
3 years ago
Sayan Nandan ce8b6e2340
Disable caching on ARM64 CI
Caching only adds latency to the entire workflow, so we'll disable
it until GitHub fixes the issue with their caching on IPv6.
3 years ago
Sayan Nandan b63d90fa58
Add benches for skyd::protocol
This was added under the 'nightly' feature gate
3 years ago
Sayan Nandan 9656d7d9f6
Upgrade deps
Also added changelog entry
3 years ago
Sayan Nandan 048e79df2c
Fix pipeline impl and add basic pipeline tests
The pipeline impl had a bug which caused a parse error; this happened
because we directly wrote the length as an integer (with the tsymbol)
when we were supposed to only write the integer in its string form
to the stream. This was fixed.

Also, some preliminary tests were added for pipelines.
3 years ago
Sayan Nandan 9b132f4351
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 2814bdb151
Bump up version to 0.7.1
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 90276e3ead
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan a43e1183b3 Bump up version 3 years ago
Sayan Nandan 4dbcce6e04 Upgrade deps 3 years ago
Sayan Nandan 8c95ef0049 Upgrade deps 3 years ago
Sayan Nandan a1ea9c3111 Upgrade deps and document parser 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 4ef28ea7e8 Upgrade deps 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 9da0cdafee Upgrade interfaces to use Skymap 3 years ago
Sayan Nandan db60133dc3 Add basic Skymap methods 3 years ago
Sayan Nandan 891f9a2e06 Remove unused deps
Also simplified new instance check
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 32fcbc2075 Add changelog and bump up version 3 years ago
Sayan Nandan c1064a7cd1 Implement and upgrade to `Corestore` 3 years ago
Sayan Nandan c20302ef75 Add storage module for custom encoding/decoding 3 years ago
Sayan Nandan 17d1c472b6 Use proc macro for uninit array magic
The proc macro does some magic to give us a const array with the full
size without having to manually write it. Magic!
3 years ago
Sayan Nandan bdc4b3483f Add basic `KVEngine` definition 3 years ago
Sayan d43e6f41da
Use `QuickLock` instead of mutex (#185)
* Use our own lock instead of parking_lot::Mutex

* Account for spurious failures in cmpxchg weak

* Ignore send error because parent may have panicked

The parent thread may have already panicked, dropping the rx.
3 years ago
Sayan bae2b8354c
Release v0.6.3 (#184)
* Bump up version to 0.6.3

* Update changelog entry
3 years ago
Sayan 2d7b9d7667
Add automated tests for TLS (#183)
* Auto start with TLS

* Add automated tests for SSL

* Add cert generation script

* Use script to generate SSL cert
3 years ago
Sayan e30d51a599
Release v0.6.2 (#180)
* Bump up version and add changelog entry

* Use separate cache object for release workflows
3 years ago
Sayan 66e5d41302
Simplify overall locks (#176)
* Remove the need for TableLockStateGuard

The htable impl uses locks under the hood making external locks
redundant.

* Use atomics instead of rwlock for poisoned state

* Simplify snapshot locking
3 years ago
Sayan Nandan 2a2addfa6d Upgrade deps and add changelog entries 3 years ago
Sayan Nandan a87478dcba Optimize dependencies 3 years ago
Sayan 8df9901740
Upgrade deps and actiondoc (#165) 3 years ago
Sayan e553c5172b
Release v0.6.1 (#164)
* Explicitly fsync and relax CPU on snap busy-loop

This commit also switches to using global `VERSION` and `URL` statics
than defining it per-crate.

* Add changelog entry and bump up version

* Optimize `dbtest` macro and rm redundant allocs

* Upgrade deps
3 years ago
Sayan Nandan 72d871ed3f Upgrade deps 3 years ago
Sayan Nandan 260b336bf6 Add tests for races and synchronized unlocks 3 years ago
Sayan a1320da52b
Migrate to using `Coremap` (#156)
* Upgrade all interfaces to use new HTable

* Document `HTable`
3 years ago
Sayan Nandan a7f5d84ef4 Bump dependencies
Also use `tokio::join` in-place of `futures::join`
3 years ago
Sayan Nandan 3616793554 Update versioning and support information [skip ci] 3 years ago
Sayan Nandan f55fa85174 Upgrade server to use client driver's `RespCode`s 3 years ago
Sayan Nandan 80fc9e5e9c Upgrade all tests to use the driver 3 years ago
Sayan Nandan d18631680c Bump up version and add changelog entry 3 years ago
Sayan Nandan 50273f324a Upgrade dependencies 3 years ago
Sayan Nandan 07dd884f3c Upgrade deps and remove unused regex in cli
Closes #128, closes #129 and closes #132
3 years ago
Sayan Nandan ba478b9f5a Add a generic implementation for a connection
This commit defines two traits: `Con` and `ConOps`. Implementors of
`ConOps` get a free implementation for `Con`. `Con` is the ultimate
object that can be used in place of the current SSL/non-SSL connection
objects. If you look at the implementations of the current connection
objects, they have a lot of repetition as they do almost the same thing
except for the fact that they have a different underlying stream.
This is exactly what we're trying to eliminate. We will also define a
generic connection handler object to reduce redundancy.
3 years ago
Sayan Nandan 6e680b33e5 Add native file locks for unix and windows systems
This commit implements file locks for unix-based systems and windows
systems. This is done by using platform-specific `__sys` modules for
locking, trying to lock and unlocking files.

A build script was added for unix-systems that make use of the
flock-posix.c file
3 years ago
Sayan Nandan aca9888109 Remove fscposix and begin adding native impls
This commit removes the fscposix.c file and begins implementing native
file locking mechanisms for each platform (supported platforms)

BSD-style `flock`s were added
3 years ago
Sayan Nandan a9710587bb Add advisory locking for POSIX systems
This commit adds a basic implementation of POSIX advisory record locking
which sets a lock on the `data.bin` file when the database server starts
and releases the lock when it terminates. This is just done for
compliance to let other processes know that we don't want them to use
the file.

However, the result depends entirely on the process that wants to do
'something' with the file. It is the responsibility of the process to
ensure that it respects the file lock.

Also, exclusive locks aren't perfect on Linux, so we can't rely on them.
See discussion #123 for more information.
3 years ago
Sayan Nandan 1be348f5a2 Upgrade deps
Closes #117, closes #118 and closes #121
3 years ago
Sayan Nandan e10cc1411f
Upgrade deps and fix actiondoc script
Closes #111 and closes #112

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 9df39187d1
Upgrade deps, add changelog entry and bump version
This closes #107, closes #108 and closes #109.

The configuration template was updated to include TLS/SSL and the
corresponding tests were also updated.

It also renames `sdb` to `skyd` for streamlining binary names.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 151d2dd454
Upgrade deps
Closes #96, Closes #97, Closes #98, Closes #101, Closes #102
and Closes #103.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 6a10f927c8
Upgrade deps
Closes #88, closes #89

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan a3398f1d07
Rebrand from TerrabaseDB to Skybase (#90)
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 2c895cf143
Upgrade dependencies
This closes #86 and also closes #87.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 8736db1034
Code cleanup and added auto-sync with repo mirror
Dependencies were upgraded

A mirror sync badge was added. Also README was revised and workflow badge was fixed.

Signed-off-by: Sayan Nandan nandansayan@outlook.com
4 years ago
Sayan Nandan 8a54e8f85d
Remove `openssl-sys` as a dependency
`openssl-sys` isn't required anymore; it was added in the `ssl` branch
during the development phase.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 3a6b9b282f
Merge branch 'ssl' into next
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 4db769c2d8 Bump bytes from 1.0.0 to 1.0.1
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.0.0...v1.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] 4f039f45f5 Bump tokio from 1.0.1 to 1.0.2
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.0.1...tokio-1.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Sayan Nandan e92a6eb8c1
Use `read_again()` to read from the `SslStream`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan d84234724d
Update to upstream changes and polish SSL API
Also several debug messages were added for debugging SSL connections.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 43ee423c83 Bump serde from 1.0.118 to 1.0.119
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.118 to 1.0.119.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.118...v1.0.119)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] c3d70ccbec Bump log from 0.4.11 to 0.4.13
Bumps [log](https://github.com/rust-lang/log) from 0.4.11 to 0.4.13.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.11...0.4.13)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
dependabot[bot] bff95b9d27 Bump regex from 1.4.2 to 1.4.3
Bumps [regex](https://github.com/rust-lang/regex) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.4.2...1.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
4 years ago
Sayan Nandan f2031129ce
Upgrade dependencies
Closes #59, closes #60, closes #61, closes #62, closes #63 and closes #64.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 43bb178954
Implement basic TLS module and connection handler
This commit implements 'TLS versions' of `CHandler` and `Listener` from
`dbnet`.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 0087d6b07c
Add basic SSL/TLS listener
This commit adds a basic SSL/TLS listener using `openssl`.
The `SslListener` object can accept a connection and get a decrypted
stream.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
dependabot[bot] 5d17e0a89d
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan c83dbd0436
Improve error handling in snapstore
We've made the error handling slightly 'less aggressive' than the
previous version which `unwrap`ped here and there.

Also, the documentation for the entire snapstore module was greatly
improved.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan b257b7286d
Further reduce the size of the docker image
Also the deps were upgraded (there's no point of dependabot creating
multiple commits for upgrading deps)

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 792351108d
Rollout 0.5.0
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan bfb4b920df
Bump up version and add changelog entry
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 824944e30e
Don't use an explicit `enabled` flag in `snapshot`
There is no merit in having a redundant `enabled` key under
`snapshot` in the configuration file; if a `snapshot` key is present,
it is inherently obvious that snapshotting is enabled

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan ac37769b7a
Rollout v0.4.5
Also, the actiondoc for `MKSNAP` was updated and a changelog entry was
added for this release

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan bc1a6fd456
Upgrade tokio to 0.3.2
Upstream changes in tokio have required several changes.
For example, `delay_until` was renamed to `sleep_until`. Similarly,
`notify` was renamed to `notify_one`.
Also, in tdb-macros, the `runtime::Builder::new()` line was changed into
`runtime::Builder::new_multi_thread()` due to changes upstream

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 0ea02f846a
Add tests for MKSNAP and bump up version
We don't need tests for MKSNAP when it is enabled as we already have
tests for snapshotting in `diskstore::snapshot`

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 47831252b3
Fix the `dbtest` macro using a `#[test]` attribute
Also several misc. fixes were made to the `dbtest` compiler macro
The macro now creates a TcpListener and closes the socket once finished
4 years ago
Sayan 44cb12955d
Fix `tokio` version 4 years ago
Sayan Nandan 147f13a020
Rename `tdb-derive` to `tdb-macros`
The proc_macro can now be applied on modules only
All functions within the module will be considered to be a test
This has the advantage of not having to flag every test function
4 years ago