Skip to content

Commit

Permalink
test: sqlness upgrade compatibility tests (#5126)
Browse files Browse the repository at this point in the history
* feat: simple version switch

* chore: remove debug print

* chore: add common folder

* tests: add drop table

* feat: pull versioned binary

* chore: don't use native-tls

* chore: rm outdated docs

* chore: new line

* fix: save old bin dir

* fix: switch version restart all node

* feat: use etcd

* fix: wait for election

* fix: normal sqlness

* refactor: hashmap for bin dir

* test: past 3 major version compat crate table

* refactor: allow using without setup etcd
  • Loading branch information
discord9 authored Dec 17, 2024
1 parent d821dc5 commit 421088a
Show file tree
Hide file tree
Showing 18 changed files with 1,420 additions and 33 deletions.
70 changes: 68 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/common/meta/src/kv_backend/etcd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use std::any::Any;
use std::sync::Arc;

use common_telemetry::info;
use etcd_client::{
Client, DeleteOptions, GetOptions, PutOptions, Txn, TxnOp, TxnOpResponse, TxnResponse,
};
Expand Down Expand Up @@ -55,6 +56,7 @@ impl EtcdStore {
}

pub fn with_etcd_client(client: Client, max_txn_ops: usize) -> KvBackendRef {
info!("Connected to etcd");
Arc::new(Self {
client,
max_txn_ops,
Expand Down
10 changes: 10 additions & 0 deletions tests/conf/metasrv-test.toml.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
flush_stats_factor = 1
{{ if use_etcd }}
## Store server address default to etcd store.
store_addrs = [{store_addrs | unescaped}]

## Store data in memory.
use_memory_store = false

## The datastore for meta server.
backend = "EtcdStore"
{{ endif }}
[wal]
{{ if is_raft_engine }}
provider = "raft_engine"
Expand Down
12 changes: 9 additions & 3 deletions tests/runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ common-query.workspace = true
common-recordbatch.workspace = true
common-time.workspace = true
datatypes = { workspace = true }
flate2 = "1.0"
hex = "0.4"
local-ip-address = "0.6"
mysql = { version = "25.0.1", default-features = false, features = ["minimal", "rustls-tls"] }
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
serde.workspace = true
serde_json.workspace = true
tokio-postgres = { workspace = true }
# sqlness 0.6.0 have a bug causing `cargo sqlness` to fail(see https://github.com/CeresDB/sqlness/issues/68) which is fixed in 0.6.1
sqlness = "0.6.1"
sha2 = "0.10"
sqlness = "0.6.1" # sqlness 0.6.0 have a bug causing `cargo sqlness` to fail(see https://github.com/CeresDB/sqlness/issues/68) which is fixed in 0.6.1
tar = "0.4"
tempfile.workspace = true
tinytemplate = "1.2"
tokio.workspace = true
tokio-postgres = { workspace = true }
tokio-stream.workspace = true
Loading

0 comments on commit 421088a

Please sign in to comment.