refactor: procedure storage (#279)

## Rationale
The current design of the procedure storage module is unreasonable. The
data will be stored permanently and will not be cleared. This will cause
the storage space of `ETCD` to be filled up quickly. We need to redesign
the interface of procedure storage.

## Detailed Changes
* Add `ttl` config for `CreateOrUpdate`.
* Add `Delete` interface, it used to delete history procedure data and
current procedure data.

## Test Plan
Pass all unit tests and integration tests.
20 files changed
tree: 92a12bdf9e2e5baa6ffd2c45c5007c4d2c1655d7
  1. .github/
  2. cmd/
  3. config/
  4. docker/
  5. docs/
  6. pkg/
  7. scripts/
  8. server/
  9. .gitignore
  10. .golangci.yml
  11. CODE_OF_CONDUCT.md
  12. CONTRIBUTING.md
  13. Dockerfile
  14. go.mod
  15. go.sum
  16. LICENSE
  17. licenserc.toml
  18. Makefile
  19. README.md
README.md

HoraeMeta

codecov License

HoraeMeta is the meta service for managing the HoraeDB cluster.

Status

The project is in a very early stage.

Quick Start

Build HoraeMeta binary

make build

Standalone Mode

Although HoraeMeta is designed to deployed as a cluster with three or more instances, it can also be started standalone:

# HoraeMeta0
mkdir /tmp/meta0
./bin/ceresmeta-server --config ./config/example-standalone.toml

Cluster mode

Here is an example for starting HoraeMeta in cluster mode (three instances) on single machine by using different ports:

# Create directories.
mkdir /tmp/meta0
mkdir /tmp/meta1
mkdir /tmp/meta2

# horaemeta0
./bin/ceresmeta-server --config ./config/exampl-cluster0.toml

# horaemeta1
./bin/ceresmeta-server --config ./config/exampl-cluster1.toml

# horaemeta2
./bin/ceresmeta-server --config ./config/exampl-cluster2.toml

Acknowledgment

HoraeMeta refers to the excellent project pd in design and some module and codes are forked from pd, thanks to the TiKV team.

Contributing

The project is under rapid development so that any contribution is welcome. Check our Contributing Guide and make your first contribution!

License

HoraeMeta is under Apache License 2.0.