evenyag f06968f4f5 feat: Engine::open_region code skeleton (#120)
* refactor: Move fields in SharedData to EngineInner

Since `SharedData` isn't shared now, we move all its fields to
EngineInner, and remove the `SharedData` struct, also remove the
unused config field.

* feat: Store RegionSlot in engine's region map

A `RegionSlot` has three possible state:
- Opening
- Creating
- Ready (Holds the `RegionImpl`)

Also use the `RegionSlot` as a placeholder in the region map to indicate
the region is opening/creating, so another open/create request will
fail immediately. The `SlotGuard` is used to clean the slot if we failed
to create/open the region.

* feat: Add a blank method `RegionImpl::open`

* feat: Remove MetadataId from Manifest

Now metadata id of manifest is unused, also unnecessary as we have
manifest dir to build the manifest, but constructing the manifest
still needs a passing region id as argument, which is unavailable
during opening region. So we remove the metadata id from manifest so
`region_store_config()` don't need region id as input anymore

* feat: Remove region id from logstore::Namespace and Wal

This is necessary for implementing open, since we don't have region
id this time, but we need to build Wal and its logstore namespace. Now
this is ok as id is not actually used by logstore.

* feat: Setup `open_region` code skeleton
2022-07-29 17:52:33 +08:00
2022-06-29 17:01:15 +08:00
2022-07-07 15:54:34 +08:00
2022-07-27 15:14:10 +08:00

GreptimeDB

codecov

GreptimeDB: the next-generation hybrid timeseries/analytics processing database in the cloud.

Getting Started

Prerequisites

To compile GreptimeDB from source, you'll need the following:

  • Rust
  • C++ toolchain
  • cmake
  • OpenSSL

Rust

The easiest way to install Rust is to use rustup, which will check our rust-toolchain file and install correct Rust version for you.

C++ toolchain

The prost-build dependency requires C++ toolchain and cmake to build its bundled protoc. For more info on what the required dependencies are check here.

cmake

Follow the instructions for your operating system on the cmake site.

For macOS users, you can also use homebrew to install cmake.

brew install cmake

OpenSSL

For Ubuntu:

sudo apt install libssl-dev

For RedHat-based: Fedora, Oracle Linux, etc:

sudo dnf install openssl-devel

For macOS:

brew install openssl

Usage

// Start datanode with default options.
cargo run -- datanode start

OR

// Start datanode with `http-addr` option.
cargo run -- datanode start --http-addr=0.0.0.0:9999

OR

// Start datanode with `log-dir` and `log-level` options.
cargo run -- --log-dir=logs --log-level=debug datanode start
Description
Languages
Rust 99.6%