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
next
Sayan Nandan 4 years ago
parent 8a54e8f85d
commit 8736db1034
No known key found for this signature in database
GPG Key ID: C31EFD7DDA12AEE0

@ -0,0 +1,16 @@
name: Sync with mirrors
on: push
jobs:
sync-mirror-1:
name: Sync with repo mirror
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Get all tags and branches
- name: Run sync
env:
SYNC_EP: ${{ secrets.MIRROR_GL_API }}
run: |
eval '${SYNC_EP}'

42
Cargo.lock generated

@ -69,12 +69,6 @@ version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cfg-if"
version = "1.0.0"
@ -251,7 +245,7 @@ version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4060f4657be78b8e766215b02b18a2e862d83745545de804638e2b545e81aee6"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"libc",
"wasi",
]
@ -277,7 +271,7 @@ version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
]
[[package]]
@ -339,11 +333,11 @@ dependencies = [
[[package]]
name = "log"
version = "0.4.13"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2"
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
dependencies = [
"cfg-if 0.1.10",
"cfg-if",
]
[[package]]
@ -426,7 +420,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70"
dependencies = [
"bitflags",
"cfg-if 1.0.0",
"cfg-if",
"foreign-types",
"lazy_static",
"libc",
@ -473,7 +467,7 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"instant",
"libc",
"redox_syscall",
@ -557,9 +551,9 @@ dependencies = [
[[package]]
name = "rand"
version = "0.8.2"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e"
checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e"
dependencies = [
"libc",
"rand_chacha",
@ -633,18 +627,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "serde"
version = "1.0.119"
version = "1.0.123"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bdd36f49e35b61d49efd8aa7fc068fd295961fd2286d0b2ee9a4c7a14e99cc3"
checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.119"
version = "1.0.123"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "552954ce79a059ddd5fd68c271592374bd15cab2274970380c000118aeffe1cd"
checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31"
dependencies = [
"proc-macro2",
"quote",
@ -689,7 +683,7 @@ version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"libc",
"winapi",
]
@ -702,9 +696,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "syn"
version = "1.0.58"
version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5"
checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
dependencies = [
"proc-macro2",
"quote",
@ -798,9 +792,9 @@ dependencies = [
[[package]]
name = "tokio"
version = "1.0.2"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ca04cec6ff2474c638057b65798f60ac183e5e79d3448bb7163d36a39cff6ec"
checksum = "6714d663090b6b0acb0fa85841c6d66233d150cdb2602c8f9b8abb03370beb3f"
dependencies = [
"autocfg",
"bytes",

@ -3,16 +3,16 @@
<img src="https://raw.githubusercontent.com/terrabasedb/docs/master/docs/assets/img/favicon.ico" height=64 width=64 style="float:left">
<h1>Terrabase<b>DB</b></h1><h3>The next-generation NoSQL database</h3>
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/terrabasedb/terrabasedb/Tests?style=flat-square) ![Status: Alpha](https://img.shields.io/badge/status-alpha-critical?style=flat-square) ![Development](https://img.shields.io/badge/development-actively%20developed-32CD32?style=flat-square) ![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/terrabasedb/terrabasedb?include_prereleases&sort=semver&style=flat-square)
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/terrabasedb/terrabasedb/Test%20(push)) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/terrabasedb/terrabasedb/Sync%20with%20mirrors?label=mirror%20sync) ![Status: Alpha](https://img.shields.io/badge/status-alpha-critical?style=flat-square) ![Development](https://img.shields.io/badge/development-regular-32CD32?style=flat-square) ![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/terrabasedb/terrabasedb?include_prereleases&sort=semver&style=flat-square)
[![Docker Pulls](https://img.shields.io/docker/pulls/terrabasedb/tdb?style=flat-square)](https://hub.docker.com/r/terrabasedb/tdb)
[![Docs](https://img.shields.io/badge/readthedocs-here-blueviolet?style=flat-square)](https://terrabasedb.github.io/docs) [![Contribute Now](https://img.shields.io/badge/%F0%9F%8C%9Fcontribute-now-a94064)](https://ohsayan.github.io/thanks)
[![Docs](https://img.shields.io/badge/readthedocs-here-blueviolet?style=flat-square)](https://terrabasedb.github.io/docs) [![Contribute Now](https://img.shields.io/badge/%F0%9F%8C%9Fcontribute-now-a94064)](https://ohsayan.github.io/thanks)
</div>
</html>
## What is TerrabaseDB?
TerrabaseDB (or TDB for short) is an effort to provide the best of key/value stores, document stores and columnar databases, that is, **simplicity, flexibility and queryability at scale**. TDB is curently in an alpha stage, but can be used as a **performant** and **persistent key-value store**.
TerrabaseDB (or TDB for short) is an effort to provide the best of key/value stores, document stores and columnar databases, that is, **simplicity, flexibility and queryability at scale**. TDB is curently in an alpha stage, but can be used as a **performant**, **secure** and **persistent key-value store**.
## Getting started 🚀
@ -22,11 +22,14 @@ TerrabaseDB (or TDB for short) is an effort to provide the best of key/value sto
4. First run `tdb` to start the database server and then run `tsh` to start the interactive shell
5. Run commands like: `SET foo bar` , `GET bar` , `UPDATE cat mitten` or `DEL proprietary` 🤪 on `tsh` !
You can learn more about installation [here](https://terrabasedb.github.io/docs/Getting-Started/)
## Features
* **Insanely fast**: Scale to millions of queries per second per node
* **Key/value store**: `GET` , `SET` , `UPDATE` and [all that stuff](https://terrabasedb.github.io/docs/List-Of-Actions)
* **Snapshots**: Automated (and tunable) snapshots for stress-free backups
* **Secure**: Secure connections are built into TDB with SSL/TLS
* **Multithreaded**: Designed to exploit all CPU cores
* **Resource friendly**: The database server doesn't need more than 1MB to run
* **Convenient**: Without the setup hassle and system-specific dependencies

@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
libtdb = {path = "../libtdb"}
tokio = {version = "1.0.2", features = ["full"]}
tokio = {version = "1.1.1", features = ["full"]}
bytes = "1.0.1"
regex = "1.4.3"
lazy_static = "1.4.0"

@ -7,7 +7,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1.0.2", features = ["full"] }
tokio = { version = "1.1.1", features = ["full"] }
bytes = "1.0.1"
libtdb = {path ="../libtdb"}
bincode = "1.3.1"
@ -15,11 +15,11 @@ parking_lot = "0.11.1"
lazy_static = "1.4.0"
serde_derive = "1.0.119"
futures = "0.3.12"
serde = {version = "1.0.119", features= ["derive"]}
serde = {version = "1.0.123", features= ["derive"]}
toml = "0.5.8"
clap = {version = "2.33.3", features=["yaml"]}
env_logger = "0.8.2"
log = "0.4.13"
log = "0.4.14"
chrono = "0.4.19"
regex = "1.4.3"
tdb_macros = {path="../tdb-macros"}
@ -29,4 +29,4 @@ openssl = { version = "0.10", features = ["vendored"] }
jemallocator = "0.3.2"
[dev-dependencies]
tokio = { version = "1.0.2", features = ["test-util"] }
tokio = { version = "1.1.1", features = ["test-util"] }

@ -31,11 +31,11 @@ use std::fs;
use std::net::Ipv6Addr;
use std::net::{IpAddr, Ipv4Addr};
use std::path::PathBuf;
use tokio::net::ToSocketAddrs;
use toml;
const DEFAULT_IPV4: IpAddr = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
const DEFAULT_PORT: u16 = 2003;
#[allow(dead_code)]
const DEFAULT_PORT: u16 = 2003; // We'll suppress this lint as we've kept this for future use
const DEFAULT_SSL_PORT: u16 = 2004;
/// This struct is an _object representation_ used for parsing the TOML file
@ -240,14 +240,6 @@ impl SnapshotConfig {
pub const fn default() -> Self {
SnapshotConfig::Disabled
}
/// Check if snapshotting is enabled
pub const fn is_enabled(&self) -> bool {
if let SnapshotConfig::Disabled = self {
false
} else {
true
}
}
}
/// A `ParsedConfig` which can be used by main::check_args_or_connect() to bind

@ -209,6 +209,7 @@ impl Data {
impl CoreDB {
#[cfg(debug_assertions)]
#[allow(dead_code)] // This has been kept for debugging purposes, so we'll suppress this lint
/// Flush the coretable entries when in debug mode
pub fn print_debug_table(&self) {
if self.acquire_read().coremap.len() == 0 {

@ -36,6 +36,12 @@ use tokio_openssl::SslStream;
/// All trait implementors are given access to an asynchronous stream to which
/// they must write a response.
///
/// Every `write()` call makes a call to the [`IsConnection`](./IsConnection)'s
/// `write_lowlevel` function, which in turn writes something to the underlying stream.
///
/// Do note that this write **doesn't gurantee immediate completion** as the underlying
/// stream might use buffering. So, the best idea would be to use to use the `flush()`
/// call on the stream.
pub trait Writable {
/*
HACK(@ohsayan): Since `async` is not supported in traits just yet, we will have to

@ -7,9 +7,9 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rand = "0.8.2"
rand = "0.8.3"
devtimer = "4.0.1"
libtdb = {path="../libtdb"}
clap = {version = "2.33.3", features=["yaml"]}
serde = {version="1.0.119", features=["derive"]}
serde = {version="1.0.123", features=["derive"]}
serde_json = "1.0.61"

@ -10,7 +10,7 @@ edition = "2018"
proc-macro = true
[dependencies]
syn = {version = "1.0.58", features = ["full"]}
syn = {version = "1.0.60", features = ["full"]}
quote = "1.0.8"
rand = "0.8.2"
rand = "0.8.3"
proc-macro2 = "1.0.24"

Loading…
Cancel
Save