mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-07 22:02:56 +00:00
Compare commits
1 Commits
feat/prefi
...
v0.13.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
557e850d87 |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -91,7 +91,7 @@ env:
|
|||||||
# The scheduled version is '${{ env.NEXT_RELEASE_VERSION }}-nightly-YYYYMMDD', like v0.2.0-nigthly-20230313;
|
# The scheduled version is '${{ env.NEXT_RELEASE_VERSION }}-nightly-YYYYMMDD', like v0.2.0-nigthly-20230313;
|
||||||
NIGHTLY_RELEASE_PREFIX: nightly
|
NIGHTLY_RELEASE_PREFIX: nightly
|
||||||
# Note: The NEXT_RELEASE_VERSION should be modified manually by every formal release.
|
# Note: The NEXT_RELEASE_VERSION should be modified manually by every formal release.
|
||||||
NEXT_RELEASE_VERSION: v0.14.0
|
NEXT_RELEASE_VERSION: v0.13.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
allocate-runners:
|
allocate-runners:
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -54,6 +54,3 @@ tests-fuzz/corpus/
|
|||||||
# Nix
|
# Nix
|
||||||
.direnv
|
.direnv
|
||||||
.envrc
|
.envrc
|
||||||
|
|
||||||
## default data home
|
|
||||||
greptimedb_data
|
|
||||||
|
|||||||
166
Cargo.lock
generated
166
Cargo.lock
generated
@@ -185,7 +185,7 @@ checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "api"
|
name = "api"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"common-base",
|
"common-base",
|
||||||
"common-decimal",
|
"common-decimal",
|
||||||
@@ -710,7 +710,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "auth"
|
name = "auth"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -1324,7 +1324,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cache"
|
name = "cache"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"catalog",
|
"catalog",
|
||||||
"common-error",
|
"common-error",
|
||||||
@@ -1348,7 +1348,7 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "catalog"
|
name = "catalog"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arrow",
|
"arrow",
|
||||||
@@ -1661,7 +1661,7 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cli"
|
name = "cli"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"auth",
|
"auth",
|
||||||
@@ -1704,7 +1704,7 @@ dependencies = [
|
|||||||
"session",
|
"session",
|
||||||
"snafu 0.8.5",
|
"snafu 0.8.5",
|
||||||
"store-api",
|
"store-api",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"table",
|
"table",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"tokio",
|
"tokio",
|
||||||
@@ -1713,7 +1713,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "client"
|
name = "client"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@@ -1740,7 +1740,7 @@ dependencies = [
|
|||||||
"rand",
|
"rand",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"snafu 0.8.5",
|
"snafu 0.8.5",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"substrait 0.37.3",
|
"substrait 0.37.3",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
@@ -1781,7 +1781,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cmd"
|
name = "cmd"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"auth",
|
"auth",
|
||||||
@@ -1842,7 +1842,7 @@ dependencies = [
|
|||||||
"similar-asserts",
|
"similar-asserts",
|
||||||
"snafu 0.8.5",
|
"snafu 0.8.5",
|
||||||
"store-api",
|
"store-api",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"table",
|
"table",
|
||||||
"temp-env",
|
"temp-env",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
@@ -1888,7 +1888,7 @@ checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-base"
|
name = "common-base"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anymap2",
|
"anymap2",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -1910,11 +1910,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-catalog"
|
name = "common-catalog"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-config"
|
name = "common-config"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"common-base",
|
"common-base",
|
||||||
"common-error",
|
"common-error",
|
||||||
@@ -1939,7 +1939,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-datasource"
|
name = "common-datasource"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-schema",
|
"arrow-schema",
|
||||||
@@ -1975,7 +1975,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-decimal"
|
name = "common-decimal"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bigdecimal 0.4.5",
|
"bigdecimal 0.4.5",
|
||||||
"common-error",
|
"common-error",
|
||||||
@@ -1988,7 +1988,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-error"
|
name = "common-error"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"http 1.1.0",
|
"http 1.1.0",
|
||||||
"snafu 0.8.5",
|
"snafu 0.8.5",
|
||||||
@@ -1998,7 +1998,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-frontend"
|
name = "common-frontend"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"common-error",
|
"common-error",
|
||||||
@@ -2008,7 +2008,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-function"
|
name = "common-function"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.11",
|
"ahash 0.8.11",
|
||||||
"api",
|
"api",
|
||||||
@@ -2059,7 +2059,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-greptimedb-telemetry"
|
name = "common-greptimedb-telemetry"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"common-runtime",
|
"common-runtime",
|
||||||
@@ -2076,7 +2076,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-grpc"
|
name = "common-grpc"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arrow-flight",
|
"arrow-flight",
|
||||||
@@ -2104,7 +2104,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-grpc-expr"
|
name = "common-grpc-expr"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"common-base",
|
"common-base",
|
||||||
@@ -2123,7 +2123,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-macro"
|
name = "common-macro"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
"common-query",
|
"common-query",
|
||||||
@@ -2137,7 +2137,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-mem-prof"
|
name = "common-mem-prof"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"common-error",
|
"common-error",
|
||||||
"common-macro",
|
"common-macro",
|
||||||
@@ -2150,7 +2150,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-meta"
|
name = "common-meta"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anymap2",
|
"anymap2",
|
||||||
"api",
|
"api",
|
||||||
@@ -2211,7 +2211,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-options"
|
name = "common-options"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"common-grpc",
|
"common-grpc",
|
||||||
"humantime-serde",
|
"humantime-serde",
|
||||||
@@ -2220,11 +2220,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-plugins"
|
name = "common-plugins"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-pprof"
|
name = "common-pprof"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"common-error",
|
"common-error",
|
||||||
"common-macro",
|
"common-macro",
|
||||||
@@ -2236,7 +2236,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-procedure"
|
name = "common-procedure"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-stream",
|
"async-stream",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -2263,7 +2263,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-procedure-test"
|
name = "common-procedure-test"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"common-procedure",
|
"common-procedure",
|
||||||
@@ -2271,7 +2271,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-query"
|
name = "common-query"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -2297,7 +2297,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-recordbatch"
|
name = "common-recordbatch"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
"common-error",
|
"common-error",
|
||||||
@@ -2316,7 +2316,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-runtime"
|
name = "common-runtime"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"clap 4.5.19",
|
"clap 4.5.19",
|
||||||
@@ -2346,7 +2346,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-telemetry"
|
name = "common-telemetry"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"backtrace",
|
"backtrace",
|
||||||
@@ -2374,7 +2374,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-test-util"
|
name = "common-test-util"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"client",
|
"client",
|
||||||
"common-query",
|
"common-query",
|
||||||
@@ -2386,7 +2386,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-time"
|
name = "common-time"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -2404,7 +2404,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-version"
|
name = "common-version"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build-data",
|
"build-data",
|
||||||
"const_format",
|
"const_format",
|
||||||
@@ -2414,7 +2414,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "common-wal"
|
name = "common-wal"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"common-base",
|
"common-base",
|
||||||
"common-error",
|
"common-error",
|
||||||
@@ -3345,7 +3345,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "datanode"
|
name = "datanode"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arrow-flight",
|
"arrow-flight",
|
||||||
@@ -3397,7 +3397,7 @@ dependencies = [
|
|||||||
"session",
|
"session",
|
||||||
"snafu 0.8.5",
|
"snafu 0.8.5",
|
||||||
"store-api",
|
"store-api",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"table",
|
"table",
|
||||||
"tokio",
|
"tokio",
|
||||||
"toml 0.8.19",
|
"toml 0.8.19",
|
||||||
@@ -3406,7 +3406,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "datatypes"
|
name = "datatypes"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4050,7 +4050,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "file-engine"
|
name = "file-engine"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -4119,12 +4119,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flate2"
|
name = "flate2"
|
||||||
version = "1.1.0"
|
version = "1.0.34"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
|
checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
"libz-rs-sys",
|
|
||||||
"libz-sys",
|
"libz-sys",
|
||||||
"miniz_oxide",
|
"miniz_oxide",
|
||||||
]
|
]
|
||||||
@@ -4161,7 +4160,7 @@ checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flow"
|
name = "flow"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arrow",
|
"arrow",
|
||||||
@@ -4223,7 +4222,7 @@ dependencies = [
|
|||||||
"snafu 0.8.5",
|
"snafu 0.8.5",
|
||||||
"store-api",
|
"store-api",
|
||||||
"strum 0.25.0",
|
"strum 0.25.0",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"table",
|
"table",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tonic 0.12.3",
|
"tonic 0.12.3",
|
||||||
@@ -4278,7 +4277,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "frontend"
|
name = "frontend"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@@ -5546,7 +5545,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "index"
|
name = "index"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"asynchronous-codec",
|
"asynchronous-codec",
|
||||||
@@ -6279,15 +6278,6 @@ dependencies = [
|
|||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libz-rs-sys"
|
|
||||||
version = "0.4.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "902bc563b5d65ad9bba616b490842ef0651066a1a1dc3ce1087113ffcb873c8d"
|
|
||||||
dependencies = [
|
|
||||||
"zlib-rs",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libz-sys"
|
name = "libz-sys"
|
||||||
version = "1.1.20"
|
version = "1.1.20"
|
||||||
@@ -6348,7 +6338,7 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log-query"
|
name = "log-query"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"common-error",
|
"common-error",
|
||||||
@@ -6360,7 +6350,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log-store"
|
name = "log-store"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-stream",
|
"async-stream",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -6653,7 +6643,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "meta-client"
|
name = "meta-client"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -6680,7 +6670,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "meta-srv"
|
name = "meta-srv"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -6767,7 +6757,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "metric-engine"
|
name = "metric-engine"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"aquamarine",
|
"aquamarine",
|
||||||
@@ -6832,9 +6822,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "miniz_oxide"
|
name = "miniz_oxide"
|
||||||
version = "0.8.5"
|
version = "0.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
|
checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"adler2",
|
"adler2",
|
||||||
]
|
]
|
||||||
@@ -6865,7 +6855,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mito2"
|
name = "mito2"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"aquamarine",
|
"aquamarine",
|
||||||
@@ -7562,7 +7552,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "object-store"
|
name = "object-store"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -7811,7 +7801,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "operator"
|
name = "operator"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.11",
|
"ahash 0.8.11",
|
||||||
"api",
|
"api",
|
||||||
@@ -7859,7 +7849,7 @@ dependencies = [
|
|||||||
"sql",
|
"sql",
|
||||||
"sqlparser 0.52.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=71dd86058d2af97b9925093d40c4e03360403170)",
|
"sqlparser 0.52.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=71dd86058d2af97b9925093d40c4e03360403170)",
|
||||||
"store-api",
|
"store-api",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"table",
|
"table",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
@@ -8096,7 +8086,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "partition"
|
name = "partition"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -8364,7 +8354,7 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pipeline"
|
name = "pipeline"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.11",
|
"ahash 0.8.11",
|
||||||
"api",
|
"api",
|
||||||
@@ -8504,7 +8494,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "plugins"
|
name = "plugins"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"auth",
|
"auth",
|
||||||
"clap 4.5.19",
|
"clap 4.5.19",
|
||||||
@@ -8766,7 +8756,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "promql"
|
name = "promql"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.11",
|
"ahash 0.8.11",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -9013,7 +9003,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "puffin"
|
name = "puffin"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-compression 0.4.13",
|
"async-compression 0.4.13",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -9054,7 +9044,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "query"
|
name = "query"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.11",
|
"ahash 0.8.11",
|
||||||
"api",
|
"api",
|
||||||
@@ -9119,7 +9109,7 @@ dependencies = [
|
|||||||
"sqlparser 0.52.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=71dd86058d2af97b9925093d40c4e03360403170)",
|
"sqlparser 0.52.0 (git+https://github.com/GreptimeTeam/sqlparser-rs.git?rev=71dd86058d2af97b9925093d40c4e03360403170)",
|
||||||
"statrs",
|
"statrs",
|
||||||
"store-api",
|
"store-api",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"table",
|
"table",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-stream",
|
"tokio-stream",
|
||||||
@@ -10474,7 +10464,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "servers"
|
name = "servers"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash 0.8.11",
|
"ahash 0.8.11",
|
||||||
"api",
|
"api",
|
||||||
@@ -10591,7 +10581,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "session"
|
name = "session"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arc-swap",
|
"arc-swap",
|
||||||
@@ -10900,7 +10890,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sql"
|
name = "sql"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -10954,7 +10944,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlness-runner"
|
name = "sqlness-runner"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"clap 4.5.19",
|
"clap 4.5.19",
|
||||||
@@ -11271,7 +11261,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "store-api"
|
name = "store-api"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"aquamarine",
|
"aquamarine",
|
||||||
@@ -11401,7 +11391,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "substrait"
|
name = "substrait"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -11582,7 +11572,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "table"
|
name = "table"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -11833,7 +11823,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tests-fuzz"
|
name = "tests-fuzz"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arbitrary",
|
"arbitrary",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -11877,7 +11867,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tests-integration"
|
name = "tests-integration"
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"api",
|
"api",
|
||||||
"arrow-flight",
|
"arrow-flight",
|
||||||
@@ -11943,7 +11933,7 @@ dependencies = [
|
|||||||
"sql",
|
"sql",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
"store-api",
|
"store-api",
|
||||||
"substrait 0.14.0",
|
"substrait 0.13.0",
|
||||||
"table",
|
"table",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"time",
|
"time",
|
||||||
@@ -13964,12 +13954,6 @@ dependencies = [
|
|||||||
"syn 2.0.96",
|
"syn 2.0.96",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "zlib-rs"
|
|
||||||
version = "0.4.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8b20717f0917c908dc63de2e44e97f1e6b126ca58d0e391cee86d504eb8fbd05"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zstd"
|
name = "zstd"
|
||||||
version = "0.11.2+zstd.1.5.2"
|
version = "0.11.2+zstd.1.5.2"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ members = [
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.14.0"
|
version = "0.13.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
||||||
@@ -126,7 +126,6 @@ deadpool-postgres = "0.12"
|
|||||||
derive_builder = "0.12"
|
derive_builder = "0.12"
|
||||||
dotenv = "0.15"
|
dotenv = "0.15"
|
||||||
etcd-client = "0.14"
|
etcd-client = "0.14"
|
||||||
flate2 = { version = "1.1.0", default-features = false, features = ["zlib-rs"] }
|
|
||||||
fst = "0.4.7"
|
fst = "0.4.7"
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ Start a GreptimeDB container with:
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run -p 127.0.0.1:4000-4003:4000-4003 \
|
docker run -p 127.0.0.1:4000-4003:4000-4003 \
|
||||||
-v "$(pwd)/greptimedb:./greptimedb_data" \
|
-v "$(pwd)/greptimedb:/tmp/greptimedb" \
|
||||||
--name greptime --rm \
|
--name greptime --rm \
|
||||||
greptime/greptimedb:latest standalone start \
|
greptime/greptimedb:latest standalone start \
|
||||||
--http-addr 0.0.0.0:4000 \
|
--http-addr 0.0.0.0:4000 \
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
| `flow` | -- | -- | flow engine options. |
|
| `flow` | -- | -- | flow engine options. |
|
||||||
| `flow.num_workers` | Integer | `0` | The number of flow worker in flownode.<br/>Not setting(or set to 0) this value will use the number of CPU cores divided by 2. |
|
| `flow.num_workers` | Integer | `0` | The number of flow worker in flownode.<br/>Not setting(or set to 0) this value will use the number of CPU cores divided by 2. |
|
||||||
| `storage` | -- | -- | The data storage options. |
|
| `storage` | -- | -- | The data storage options. |
|
||||||
| `storage.data_home` | String | `./greptimedb_data/` | The working home directory. |
|
| `storage.data_home` | String | `/tmp/greptimedb/` | The working home directory. |
|
||||||
| `storage.type` | String | `File` | The storage type used to store the data.<br/>- `File`: the data is stored in the local file system.<br/>- `S3`: the data is stored in the S3 object storage.<br/>- `Gcs`: the data is stored in the Google Cloud Storage.<br/>- `Azblob`: the data is stored in the Azure Blob Storage.<br/>- `Oss`: the data is stored in the Aliyun OSS. |
|
| `storage.type` | String | `File` | The storage type used to store the data.<br/>- `File`: the data is stored in the local file system.<br/>- `S3`: the data is stored in the S3 object storage.<br/>- `Gcs`: the data is stored in the Google Cloud Storage.<br/>- `Azblob`: the data is stored in the Azure Blob Storage.<br/>- `Oss`: the data is stored in the Aliyun OSS. |
|
||||||
| `storage.cache_path` | String | Unset | Read cache configuration for object storage such as 'S3' etc, it's configured by default when using object storage. It is recommended to configure it when using object storage for better performance.<br/>A local file directory, defaults to `{data_home}`. An empty string means disabling. |
|
| `storage.cache_path` | String | Unset | Read cache configuration for object storage such as 'S3' etc, it's configured by default when using object storage. It is recommended to configure it when using object storage for better performance.<br/>A local file directory, defaults to `{data_home}`. An empty string means disabling. |
|
||||||
| `storage.cache_capacity` | String | Unset | The local file cache capacity in bytes. If your disk space is sufficient, it is recommended to set it larger. |
|
| `storage.cache_capacity` | String | Unset | The local file cache capacity in bytes. If your disk space is sufficient, it is recommended to set it larger. |
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
| `region_engine.metric` | -- | -- | Metric engine options. |
|
| `region_engine.metric` | -- | -- | Metric engine options. |
|
||||||
| `region_engine.metric.experimental_sparse_primary_key_encoding` | Bool | `false` | Whether to enable the experimental sparse primary key encoding. |
|
| `region_engine.metric.experimental_sparse_primary_key_encoding` | Bool | `false` | Whether to enable the experimental sparse primary key encoding. |
|
||||||
| `logging` | -- | -- | The logging options. |
|
| `logging` | -- | -- | The logging options. |
|
||||||
| `logging.dir` | String | `./greptimedb_data/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
| `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
||||||
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
||||||
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
||||||
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
| `datanode.client.connect_timeout` | String | `10s` | -- |
|
| `datanode.client.connect_timeout` | String | `10s` | -- |
|
||||||
| `datanode.client.tcp_nodelay` | Bool | `true` | -- |
|
| `datanode.client.tcp_nodelay` | Bool | `true` | -- |
|
||||||
| `logging` | -- | -- | The logging options. |
|
| `logging` | -- | -- | The logging options. |
|
||||||
| `logging.dir` | String | `./greptimedb_data/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
| `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
||||||
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
||||||
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
||||||
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
|
|
||||||
| Key | Type | Default | Descriptions |
|
| Key | Type | Default | Descriptions |
|
||||||
| --- | -----| ------- | ----------- |
|
| --- | -----| ------- | ----------- |
|
||||||
| `data_home` | String | `./greptimedb_data/metasrv/` | The working home directory. |
|
| `data_home` | String | `/tmp/metasrv/` | The working home directory. |
|
||||||
| `bind_addr` | String | `127.0.0.1:3002` | The bind address of metasrv. |
|
| `bind_addr` | String | `127.0.0.1:3002` | The bind address of metasrv. |
|
||||||
| `server_addr` | String | `127.0.0.1:3002` | The communication server address for the frontend and datanode to connect to metasrv.<br/>If left empty or unset, the server will automatically use the IP address of the first network interface<br/>on the host, with the same port number as the one specified in `bind_addr`. |
|
| `server_addr` | String | `127.0.0.1:3002` | The communication server address for the frontend and datanode to connect to metasrv.<br/>If left empty or unset, the server will automatically use the IP address of the first network interface<br/>on the host, with the same port number as the one specified in `bind_addr`. |
|
||||||
| `store_addrs` | Array | -- | Store server address default to etcd store.<br/>For postgres store, the format is:<br/>"password=password dbname=postgres user=postgres host=localhost port=5432"<br/>For etcd store, the format is:<br/>"127.0.0.1:2379" |
|
| `store_addrs` | Array | -- | Store server address default to etcd store.<br/>For postgres store, the format is:<br/>"password=password dbname=postgres user=postgres host=localhost port=5432"<br/>For etcd store, the format is:<br/>"127.0.0.1:2379" |
|
||||||
@@ -352,7 +352,7 @@
|
|||||||
| `wal.backoff_base` | Integer | `2` | Exponential backoff rate, i.e. next backoff = base * current backoff. |
|
| `wal.backoff_base` | Integer | `2` | Exponential backoff rate, i.e. next backoff = base * current backoff. |
|
||||||
| `wal.backoff_deadline` | String | `5mins` | Stop reconnecting if the total wait time reaches the deadline. If this config is missing, the reconnecting won't terminate. |
|
| `wal.backoff_deadline` | String | `5mins` | Stop reconnecting if the total wait time reaches the deadline. If this config is missing, the reconnecting won't terminate. |
|
||||||
| `logging` | -- | -- | The logging options. |
|
| `logging` | -- | -- | The logging options. |
|
||||||
| `logging.dir` | String | `./greptimedb_data/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
| `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
||||||
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
||||||
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
||||||
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
||||||
@@ -442,7 +442,7 @@
|
|||||||
| `wal.dump_index_interval` | String | `60s` | The interval for dumping WAL indexes.<br/>**It's only used when the provider is `kafka`**. |
|
| `wal.dump_index_interval` | String | `60s` | The interval for dumping WAL indexes.<br/>**It's only used when the provider is `kafka`**. |
|
||||||
| `wal.overwrite_entry_start_id` | Bool | `false` | Ignore missing entries during read WAL.<br/>**It's only used when the provider is `kafka`**.<br/><br/>This option ensures that when Kafka messages are deleted, the system<br/>can still successfully replay memtable data without throwing an<br/>out-of-range error.<br/>However, enabling this option might lead to unexpected data loss,<br/>as the system will skip over missing entries instead of treating<br/>them as critical errors. |
|
| `wal.overwrite_entry_start_id` | Bool | `false` | Ignore missing entries during read WAL.<br/>**It's only used when the provider is `kafka`**.<br/><br/>This option ensures that when Kafka messages are deleted, the system<br/>can still successfully replay memtable data without throwing an<br/>out-of-range error.<br/>However, enabling this option might lead to unexpected data loss,<br/>as the system will skip over missing entries instead of treating<br/>them as critical errors. |
|
||||||
| `storage` | -- | -- | The data storage options. |
|
| `storage` | -- | -- | The data storage options. |
|
||||||
| `storage.data_home` | String | `./greptimedb_data/` | The working home directory. |
|
| `storage.data_home` | String | `/tmp/greptimedb/` | The working home directory. |
|
||||||
| `storage.type` | String | `File` | The storage type used to store the data.<br/>- `File`: the data is stored in the local file system.<br/>- `S3`: the data is stored in the S3 object storage.<br/>- `Gcs`: the data is stored in the Google Cloud Storage.<br/>- `Azblob`: the data is stored in the Azure Blob Storage.<br/>- `Oss`: the data is stored in the Aliyun OSS. |
|
| `storage.type` | String | `File` | The storage type used to store the data.<br/>- `File`: the data is stored in the local file system.<br/>- `S3`: the data is stored in the S3 object storage.<br/>- `Gcs`: the data is stored in the Google Cloud Storage.<br/>- `Azblob`: the data is stored in the Azure Blob Storage.<br/>- `Oss`: the data is stored in the Aliyun OSS. |
|
||||||
| `storage.cache_path` | String | Unset | Read cache configuration for object storage such as 'S3' etc, it's configured by default when using object storage. It is recommended to configure it when using object storage for better performance.<br/>A local file directory, defaults to `{data_home}`. An empty string means disabling. |
|
| `storage.cache_path` | String | Unset | Read cache configuration for object storage such as 'S3' etc, it's configured by default when using object storage. It is recommended to configure it when using object storage for better performance.<br/>A local file directory, defaults to `{data_home}`. An empty string means disabling. |
|
||||||
| `storage.cache_capacity` | String | Unset | The local file cache capacity in bytes. If your disk space is sufficient, it is recommended to set it larger. |
|
| `storage.cache_capacity` | String | Unset | The local file cache capacity in bytes. If your disk space is sufficient, it is recommended to set it larger. |
|
||||||
@@ -522,7 +522,7 @@
|
|||||||
| `region_engine.metric` | -- | -- | Metric engine options. |
|
| `region_engine.metric` | -- | -- | Metric engine options. |
|
||||||
| `region_engine.metric.experimental_sparse_primary_key_encoding` | Bool | `false` | Whether to enable the experimental sparse primary key encoding. |
|
| `region_engine.metric.experimental_sparse_primary_key_encoding` | Bool | `false` | Whether to enable the experimental sparse primary key encoding. |
|
||||||
| `logging` | -- | -- | The logging options. |
|
| `logging` | -- | -- | The logging options. |
|
||||||
| `logging.dir` | String | `./greptimedb_data/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
| `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
||||||
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
||||||
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
||||||
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
||||||
@@ -579,7 +579,7 @@
|
|||||||
| `heartbeat.interval` | String | `3s` | Interval for sending heartbeat messages to the metasrv. |
|
| `heartbeat.interval` | String | `3s` | Interval for sending heartbeat messages to the metasrv. |
|
||||||
| `heartbeat.retry_interval` | String | `3s` | Interval for retrying to send heartbeat messages to the metasrv. |
|
| `heartbeat.retry_interval` | String | `3s` | Interval for retrying to send heartbeat messages to the metasrv. |
|
||||||
| `logging` | -- | -- | The logging options. |
|
| `logging` | -- | -- | The logging options. |
|
||||||
| `logging.dir` | String | `./greptimedb_data/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
| `logging.dir` | String | `/tmp/greptimedb/logs` | The directory to store the log files. If set to empty, logs will not be written to files. |
|
||||||
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
| `logging.level` | String | Unset | The log level. Can be `info`/`debug`/`warn`/`error`. |
|
||||||
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
| `logging.enable_otlp_tracing` | Bool | `false` | Enable OTLP tracing. |
|
||||||
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
| `logging.otlp_endpoint` | String | `http://localhost:4317` | The OTLP tracing endpoint. |
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ provider = "raft_engine"
|
|||||||
## The directory to store the WAL files.
|
## The directory to store the WAL files.
|
||||||
## **It's only used when the provider is `raft_engine`**.
|
## **It's only used when the provider is `raft_engine`**.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
dir = "./greptimedb_data/wal"
|
dir = "/tmp/greptimedb/wal"
|
||||||
|
|
||||||
## The size of the WAL segment file.
|
## The size of the WAL segment file.
|
||||||
## **It's only used when the provider is `raft_engine`**.
|
## **It's only used when the provider is `raft_engine`**.
|
||||||
@@ -265,7 +265,7 @@ overwrite_entry_start_id = false
|
|||||||
## The data storage options.
|
## The data storage options.
|
||||||
[storage]
|
[storage]
|
||||||
## The working home directory.
|
## The working home directory.
|
||||||
data_home = "./greptimedb_data/"
|
data_home = "/tmp/greptimedb/"
|
||||||
|
|
||||||
## The storage type used to store the data.
|
## The storage type used to store the data.
|
||||||
## - `File`: the data is stored in the local file system.
|
## - `File`: the data is stored in the local file system.
|
||||||
@@ -618,7 +618,7 @@ experimental_sparse_primary_key_encoding = false
|
|||||||
## The logging options.
|
## The logging options.
|
||||||
[logging]
|
[logging]
|
||||||
## The directory to store the log files. If set to empty, logs will not be written to files.
|
## The directory to store the log files. If set to empty, logs will not be written to files.
|
||||||
dir = "./greptimedb_data/logs"
|
dir = "/tmp/greptimedb/logs"
|
||||||
|
|
||||||
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ retry_interval = "3s"
|
|||||||
## The logging options.
|
## The logging options.
|
||||||
[logging]
|
[logging]
|
||||||
## The directory to store the log files. If set to empty, logs will not be written to files.
|
## The directory to store the log files. If set to empty, logs will not be written to files.
|
||||||
dir = "./greptimedb_data/logs"
|
dir = "/tmp/greptimedb/logs"
|
||||||
|
|
||||||
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
@@ -121,3 +121,4 @@ sample_ratio = 1.0
|
|||||||
## The tokio console address.
|
## The tokio console address.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
#+ tokio_console_addr = "127.0.0.1"
|
#+ tokio_console_addr = "127.0.0.1"
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ tcp_nodelay = true
|
|||||||
## The logging options.
|
## The logging options.
|
||||||
[logging]
|
[logging]
|
||||||
## The directory to store the log files. If set to empty, logs will not be written to files.
|
## The directory to store the log files. If set to empty, logs will not be written to files.
|
||||||
dir = "./greptimedb_data/logs"
|
dir = "/tmp/greptimedb/logs"
|
||||||
|
|
||||||
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
## The working home directory.
|
## The working home directory.
|
||||||
data_home = "./greptimedb_data/metasrv/"
|
data_home = "/tmp/metasrv/"
|
||||||
|
|
||||||
## The bind address of metasrv.
|
## The bind address of metasrv.
|
||||||
bind_addr = "127.0.0.1:3002"
|
bind_addr = "127.0.0.1:3002"
|
||||||
@@ -177,7 +177,7 @@ backoff_deadline = "5mins"
|
|||||||
## The logging options.
|
## The logging options.
|
||||||
[logging]
|
[logging]
|
||||||
## The directory to store the log files. If set to empty, logs will not be written to files.
|
## The directory to store the log files. If set to empty, logs will not be written to files.
|
||||||
dir = "./greptimedb_data/logs"
|
dir = "/tmp/greptimedb/logs"
|
||||||
|
|
||||||
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ provider = "raft_engine"
|
|||||||
## The directory to store the WAL files.
|
## The directory to store the WAL files.
|
||||||
## **It's only used when the provider is `raft_engine`**.
|
## **It's only used when the provider is `raft_engine`**.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
dir = "./greptimedb_data/wal"
|
dir = "/tmp/greptimedb/wal"
|
||||||
|
|
||||||
## The size of the WAL segment file.
|
## The size of the WAL segment file.
|
||||||
## **It's only used when the provider is `raft_engine`**.
|
## **It's only used when the provider is `raft_engine`**.
|
||||||
@@ -352,7 +352,7 @@ retry_delay = "500ms"
|
|||||||
## The data storage options.
|
## The data storage options.
|
||||||
[storage]
|
[storage]
|
||||||
## The working home directory.
|
## The working home directory.
|
||||||
data_home = "./greptimedb_data/"
|
data_home = "/tmp/greptimedb/"
|
||||||
|
|
||||||
## The storage type used to store the data.
|
## The storage type used to store the data.
|
||||||
## - `File`: the data is stored in the local file system.
|
## - `File`: the data is stored in the local file system.
|
||||||
@@ -705,7 +705,7 @@ experimental_sparse_primary_key_encoding = false
|
|||||||
## The logging options.
|
## The logging options.
|
||||||
[logging]
|
[logging]
|
||||||
## The directory to store the log files. If set to empty, logs will not be written to files.
|
## The directory to store the log files. If set to empty, logs will not be written to files.
|
||||||
dir = "./greptimedb_data/logs"
|
dir = "/tmp/greptimedb/logs"
|
||||||
|
|
||||||
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
## The log level. Can be `info`/`debug`/`warn`/`error`.
|
||||||
## @toml2docs:none-default
|
## @toml2docs:none-default
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ services:
|
|||||||
- --initial-cluster-state=new
|
- --initial-cluster-state=new
|
||||||
- *etcd_initial_cluster_token
|
- *etcd_initial_cluster_token
|
||||||
volumes:
|
volumes:
|
||||||
- ./greptimedb-cluster-docker-compose/etcd0:/var/lib/etcd
|
- /tmp/greptimedb-cluster-docker-compose/etcd0:/var/lib/etcd
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "etcdctl", "--endpoints=http://etcd0:2379", "endpoint", "health" ]
|
test: [ "CMD", "etcdctl", "--endpoints=http://etcd0:2379", "endpoint", "health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
@@ -68,13 +68,12 @@ services:
|
|||||||
- datanode
|
- datanode
|
||||||
- start
|
- start
|
||||||
- --node-id=0
|
- --node-id=0
|
||||||
- --data-home=/greptimedb_data
|
|
||||||
- --rpc-bind-addr=0.0.0.0:3001
|
- --rpc-bind-addr=0.0.0.0:3001
|
||||||
- --rpc-server-addr=datanode0:3001
|
- --rpc-server-addr=datanode0:3001
|
||||||
- --metasrv-addrs=metasrv:3002
|
- --metasrv-addrs=metasrv:3002
|
||||||
- --http-addr=0.0.0.0:5000
|
- --http-addr=0.0.0.0:5000
|
||||||
volumes:
|
volumes:
|
||||||
- ./greptimedb-cluster-docker-compose/datanode0:/greptimedb_data
|
- /tmp/greptimedb-cluster-docker-compose/datanode0:/tmp/greptimedb
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "curl", "-fv", "http://datanode0:5000/health" ]
|
test: [ "CMD", "curl", "-fv", "http://datanode0:5000/health" ]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ mod tests {
|
|||||||
sync_write = false
|
sync_write = false
|
||||||
|
|
||||||
[storage]
|
[storage]
|
||||||
data_home = "./greptimedb_data/"
|
data_home = "/tmp/greptimedb/"
|
||||||
type = "File"
|
type = "File"
|
||||||
|
|
||||||
[[storage.providers]]
|
[[storage.providers]]
|
||||||
@@ -420,7 +420,7 @@ mod tests {
|
|||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
"#;
|
"#;
|
||||||
write!(file, "{}", toml_str).unwrap();
|
write!(file, "{}", toml_str).unwrap();
|
||||||
|
|
||||||
@@ -467,7 +467,7 @@ mod tests {
|
|||||||
assert_eq!(10000, ddl_timeout.as_millis());
|
assert_eq!(10000, ddl_timeout.as_millis());
|
||||||
assert_eq!(3000, timeout.as_millis());
|
assert_eq!(3000, timeout.as_millis());
|
||||||
assert!(tcp_nodelay);
|
assert!(tcp_nodelay);
|
||||||
assert_eq!("./greptimedb_data/", options.storage.data_home);
|
assert_eq!("/tmp/greptimedb/", options.storage.data_home);
|
||||||
assert!(matches!(
|
assert!(matches!(
|
||||||
&options.storage.store,
|
&options.storage.store,
|
||||||
ObjectStoreConfig::File(FileConfig { .. })
|
ObjectStoreConfig::File(FileConfig { .. })
|
||||||
@@ -483,10 +483,7 @@ mod tests {
|
|||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!("debug", options.logging.level.unwrap());
|
assert_eq!("debug", options.logging.level.unwrap());
|
||||||
assert_eq!(
|
assert_eq!("/tmp/greptimedb/test/logs".to_string(), options.logging.dir);
|
||||||
"./greptimedb_data/test/logs".to_string(),
|
|
||||||
options.logging.dir
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -529,7 +526,7 @@ mod tests {
|
|||||||
|
|
||||||
let options = cmd
|
let options = cmd
|
||||||
.load_options(&GlobalOptions {
|
.load_options(&GlobalOptions {
|
||||||
log_dir: Some("./greptimedb_data/test/logs".to_string()),
|
log_dir: Some("/tmp/greptimedb/test/logs".to_string()),
|
||||||
log_level: Some("debug".to_string()),
|
log_level: Some("debug".to_string()),
|
||||||
|
|
||||||
#[cfg(feature = "tokio-console")]
|
#[cfg(feature = "tokio-console")]
|
||||||
@@ -539,7 +536,7 @@ mod tests {
|
|||||||
.component;
|
.component;
|
||||||
|
|
||||||
let logging_opt = options.logging;
|
let logging_opt = options.logging;
|
||||||
assert_eq!("./greptimedb_data/test/logs", logging_opt.dir);
|
assert_eq!("/tmp/greptimedb/test/logs", logging_opt.dir);
|
||||||
assert_eq!("debug", logging_opt.level.as_ref().unwrap());
|
assert_eq!("debug", logging_opt.level.as_ref().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -568,11 +565,11 @@ mod tests {
|
|||||||
|
|
||||||
[storage]
|
[storage]
|
||||||
type = "File"
|
type = "File"
|
||||||
data_home = "./greptimedb_data/"
|
data_home = "/tmp/greptimedb/"
|
||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
"#;
|
"#;
|
||||||
write!(file, "{}", toml_str).unwrap();
|
write!(file, "{}", toml_str).unwrap();
|
||||||
|
|
||||||
|
|||||||
@@ -448,7 +448,7 @@ mod tests {
|
|||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
"#;
|
"#;
|
||||||
write!(file, "{}", toml_str).unwrap();
|
write!(file, "{}", toml_str).unwrap();
|
||||||
|
|
||||||
@@ -466,10 +466,7 @@ mod tests {
|
|||||||
assert_eq!(ReadableSize::gb(2), fe_opts.http.body_limit);
|
assert_eq!(ReadableSize::gb(2), fe_opts.http.body_limit);
|
||||||
|
|
||||||
assert_eq!("debug", fe_opts.logging.level.as_ref().unwrap());
|
assert_eq!("debug", fe_opts.logging.level.as_ref().unwrap());
|
||||||
assert_eq!(
|
assert_eq!("/tmp/greptimedb/test/logs".to_string(), fe_opts.logging.dir);
|
||||||
"./greptimedb_data/test/logs".to_string(),
|
|
||||||
fe_opts.logging.dir
|
|
||||||
);
|
|
||||||
assert!(!fe_opts.opentsdb.enable);
|
assert!(!fe_opts.opentsdb.enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -508,7 +505,7 @@ mod tests {
|
|||||||
|
|
||||||
let options = cmd
|
let options = cmd
|
||||||
.load_options(&GlobalOptions {
|
.load_options(&GlobalOptions {
|
||||||
log_dir: Some("./greptimedb_data/test/logs".to_string()),
|
log_dir: Some("/tmp/greptimedb/test/logs".to_string()),
|
||||||
log_level: Some("debug".to_string()),
|
log_level: Some("debug".to_string()),
|
||||||
|
|
||||||
#[cfg(feature = "tokio-console")]
|
#[cfg(feature = "tokio-console")]
|
||||||
@@ -518,7 +515,7 @@ mod tests {
|
|||||||
.component;
|
.component;
|
||||||
|
|
||||||
let logging_opt = options.logging;
|
let logging_opt = options.logging;
|
||||||
assert_eq!("./greptimedb_data/test/logs", logging_opt.dir);
|
assert_eq!("/tmp/greptimedb/test/logs", logging_opt.dir);
|
||||||
assert_eq!("debug", logging_opt.level.as_ref().unwrap());
|
assert_eq!("debug", logging_opt.level.as_ref().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ mod tests {
|
|||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
|
|
||||||
[failure_detector]
|
[failure_detector]
|
||||||
threshold = 8.0
|
threshold = 8.0
|
||||||
@@ -358,10 +358,7 @@ mod tests {
|
|||||||
assert_eq!(vec!["127.0.0.1:2379".to_string()], options.store_addrs);
|
assert_eq!(vec!["127.0.0.1:2379".to_string()], options.store_addrs);
|
||||||
assert_eq!(SelectorType::LeaseBased, options.selector);
|
assert_eq!(SelectorType::LeaseBased, options.selector);
|
||||||
assert_eq!("debug", options.logging.level.as_ref().unwrap());
|
assert_eq!("debug", options.logging.level.as_ref().unwrap());
|
||||||
assert_eq!(
|
assert_eq!("/tmp/greptimedb/test/logs".to_string(), options.logging.dir);
|
||||||
"./greptimedb_data/test/logs".to_string(),
|
|
||||||
options.logging.dir
|
|
||||||
);
|
|
||||||
assert_eq!(8.0, options.failure_detector.threshold);
|
assert_eq!(8.0, options.failure_detector.threshold);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
100.0,
|
100.0,
|
||||||
@@ -399,7 +396,7 @@ mod tests {
|
|||||||
|
|
||||||
let options = cmd
|
let options = cmd
|
||||||
.load_options(&GlobalOptions {
|
.load_options(&GlobalOptions {
|
||||||
log_dir: Some("./greptimedb_data/test/logs".to_string()),
|
log_dir: Some("/tmp/greptimedb/test/logs".to_string()),
|
||||||
log_level: Some("debug".to_string()),
|
log_level: Some("debug".to_string()),
|
||||||
|
|
||||||
#[cfg(feature = "tokio-console")]
|
#[cfg(feature = "tokio-console")]
|
||||||
@@ -409,7 +406,7 @@ mod tests {
|
|||||||
.component;
|
.component;
|
||||||
|
|
||||||
let logging_opt = options.logging;
|
let logging_opt = options.logging;
|
||||||
assert_eq!("./greptimedb_data/test/logs", logging_opt.dir);
|
assert_eq!("/tmp/greptimedb/test/logs", logging_opt.dir);
|
||||||
assert_eq!("debug", logging_opt.level.as_ref().unwrap());
|
assert_eq!("debug", logging_opt.level.as_ref().unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,7 +424,7 @@ mod tests {
|
|||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
"#;
|
"#;
|
||||||
write!(file, "{}", toml_str).unwrap();
|
write!(file, "{}", toml_str).unwrap();
|
||||||
|
|
||||||
|
|||||||
@@ -852,7 +852,7 @@ mod tests {
|
|||||||
|
|
||||||
[wal]
|
[wal]
|
||||||
provider = "raft_engine"
|
provider = "raft_engine"
|
||||||
dir = "./greptimedb_data/test/wal"
|
dir = "/tmp/greptimedb/test/wal"
|
||||||
file_size = "1GB"
|
file_size = "1GB"
|
||||||
purge_threshold = "50GB"
|
purge_threshold = "50GB"
|
||||||
purge_interval = "10m"
|
purge_interval = "10m"
|
||||||
@@ -860,7 +860,7 @@ mod tests {
|
|||||||
sync_write = false
|
sync_write = false
|
||||||
|
|
||||||
[storage]
|
[storage]
|
||||||
data_home = "./greptimedb_data/"
|
data_home = "/tmp/greptimedb/"
|
||||||
type = "File"
|
type = "File"
|
||||||
|
|
||||||
[[storage.providers]]
|
[[storage.providers]]
|
||||||
@@ -892,7 +892,7 @@ mod tests {
|
|||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
"#;
|
"#;
|
||||||
write!(file, "{}", toml_str).unwrap();
|
write!(file, "{}", toml_str).unwrap();
|
||||||
let cmd = StartCommand {
|
let cmd = StartCommand {
|
||||||
@@ -922,10 +922,7 @@ mod tests {
|
|||||||
let DatanodeWalConfig::RaftEngine(raft_engine_config) = dn_opts.wal else {
|
let DatanodeWalConfig::RaftEngine(raft_engine_config) = dn_opts.wal else {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
};
|
};
|
||||||
assert_eq!(
|
assert_eq!("/tmp/greptimedb/test/wal", raft_engine_config.dir.unwrap());
|
||||||
"./greptimedb_data/test/wal",
|
|
||||||
raft_engine_config.dir.unwrap()
|
|
||||||
);
|
|
||||||
|
|
||||||
assert!(matches!(
|
assert!(matches!(
|
||||||
&dn_opts.storage.store,
|
&dn_opts.storage.store,
|
||||||
@@ -949,7 +946,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert_eq!("debug", logging_opts.level.as_ref().unwrap());
|
assert_eq!("debug", logging_opts.level.as_ref().unwrap());
|
||||||
assert_eq!("./greptimedb_data/test/logs".to_string(), logging_opts.dir);
|
assert_eq!("/tmp/greptimedb/test/logs".to_string(), logging_opts.dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -961,7 +958,7 @@ mod tests {
|
|||||||
|
|
||||||
let opts = cmd
|
let opts = cmd
|
||||||
.load_options(&GlobalOptions {
|
.load_options(&GlobalOptions {
|
||||||
log_dir: Some("./greptimedb_data/test/logs".to_string()),
|
log_dir: Some("/tmp/greptimedb/test/logs".to_string()),
|
||||||
log_level: Some("debug".to_string()),
|
log_level: Some("debug".to_string()),
|
||||||
|
|
||||||
#[cfg(feature = "tokio-console")]
|
#[cfg(feature = "tokio-console")]
|
||||||
@@ -970,7 +967,7 @@ mod tests {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.component;
|
.component;
|
||||||
|
|
||||||
assert_eq!("./greptimedb_data/test/logs", opts.logging.dir);
|
assert_eq!("/tmp/greptimedb/test/logs", opts.logging.dir);
|
||||||
assert_eq!("debug", opts.logging.level.unwrap());
|
assert_eq!("debug", opts.logging.level.unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,13 +56,13 @@ fn test_load_datanode_example_config() {
|
|||||||
metadata_cache_tti: Duration::from_secs(300),
|
metadata_cache_tti: Duration::from_secs(300),
|
||||||
}),
|
}),
|
||||||
wal: DatanodeWalConfig::RaftEngine(RaftEngineConfig {
|
wal: DatanodeWalConfig::RaftEngine(RaftEngineConfig {
|
||||||
dir: Some("./greptimedb_data/wal".to_string()),
|
dir: Some("/tmp/greptimedb/wal".to_string()),
|
||||||
sync_period: Some(Duration::from_secs(10)),
|
sync_period: Some(Duration::from_secs(10)),
|
||||||
recovery_parallelism: 2,
|
recovery_parallelism: 2,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
storage: StorageConfig {
|
storage: StorageConfig {
|
||||||
data_home: "./greptimedb_data/".to_string(),
|
data_home: "/tmp/greptimedb/".to_string(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
region_engine: vec![
|
region_engine: vec![
|
||||||
@@ -159,10 +159,10 @@ fn test_load_metasrv_example_config() {
|
|||||||
let expected = GreptimeOptions::<MetasrvOptions> {
|
let expected = GreptimeOptions::<MetasrvOptions> {
|
||||||
component: MetasrvOptions {
|
component: MetasrvOptions {
|
||||||
selector: SelectorType::default(),
|
selector: SelectorType::default(),
|
||||||
data_home: "./greptimedb_data/metasrv/".to_string(),
|
data_home: "/tmp/metasrv/".to_string(),
|
||||||
server_addr: "127.0.0.1:3002".to_string(),
|
server_addr: "127.0.0.1:3002".to_string(),
|
||||||
logging: LoggingOptions {
|
logging: LoggingOptions {
|
||||||
dir: "./greptimedb_data/logs".to_string(),
|
dir: "/tmp/greptimedb/logs".to_string(),
|
||||||
level: Some("info".to_string()),
|
level: Some("info".to_string()),
|
||||||
otlp_endpoint: Some(DEFAULT_OTLP_ENDPOINT.to_string()),
|
otlp_endpoint: Some(DEFAULT_OTLP_ENDPOINT.to_string()),
|
||||||
tracing_sample_ratio: Some(Default::default()),
|
tracing_sample_ratio: Some(Default::default()),
|
||||||
@@ -202,7 +202,7 @@ fn test_load_standalone_example_config() {
|
|||||||
component: StandaloneOptions {
|
component: StandaloneOptions {
|
||||||
default_timezone: Some("UTC".to_string()),
|
default_timezone: Some("UTC".to_string()),
|
||||||
wal: DatanodeWalConfig::RaftEngine(RaftEngineConfig {
|
wal: DatanodeWalConfig::RaftEngine(RaftEngineConfig {
|
||||||
dir: Some("./greptimedb_data/wal".to_string()),
|
dir: Some("/tmp/greptimedb/wal".to_string()),
|
||||||
sync_period: Some(Duration::from_secs(10)),
|
sync_period: Some(Duration::from_secs(10)),
|
||||||
recovery_parallelism: 2,
|
recovery_parallelism: 2,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -219,7 +219,7 @@ fn test_load_standalone_example_config() {
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
storage: StorageConfig {
|
storage: StorageConfig {
|
||||||
data_home: "./greptimedb_data/".to_string(),
|
data_home: "/tmp/greptimedb/".to_string(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
logging: LoggingOptions {
|
logging: LoggingOptions {
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ mod tests {
|
|||||||
|
|
||||||
[wal]
|
[wal]
|
||||||
provider = "raft_engine"
|
provider = "raft_engine"
|
||||||
dir = "./greptimedb_data/wal"
|
dir = "/tmp/greptimedb/wal"
|
||||||
file_size = "1GB"
|
file_size = "1GB"
|
||||||
purge_threshold = "50GB"
|
purge_threshold = "50GB"
|
||||||
purge_interval = "10m"
|
purge_interval = "10m"
|
||||||
@@ -170,7 +170,7 @@ mod tests {
|
|||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
"#;
|
"#;
|
||||||
write!(file, "{}", toml_str).unwrap();
|
write!(file, "{}", toml_str).unwrap();
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ mod tests {
|
|||||||
let DatanodeWalConfig::RaftEngine(raft_engine_config) = opts.wal else {
|
let DatanodeWalConfig::RaftEngine(raft_engine_config) = opts.wal else {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
};
|
};
|
||||||
assert_eq!(raft_engine_config.dir.unwrap(), "./greptimedb_data/wal");
|
assert_eq!(raft_engine_config.dir.unwrap(), "/tmp/greptimedb/wal");
|
||||||
|
|
||||||
// Should be default values.
|
// Should be default values.
|
||||||
assert_eq!(opts.node_id, None);
|
assert_eq!(opts.node_id, None);
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ mod vector_div;
|
|||||||
mod vector_mul;
|
mod vector_mul;
|
||||||
mod vector_norm;
|
mod vector_norm;
|
||||||
mod vector_sub;
|
mod vector_sub;
|
||||||
mod vector_subvector;
|
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
@@ -57,7 +56,6 @@ impl VectorFunction {
|
|||||||
registry.register(Arc::new(vector_div::VectorDivFunction));
|
registry.register(Arc::new(vector_div::VectorDivFunction));
|
||||||
registry.register(Arc::new(vector_norm::VectorNormFunction));
|
registry.register(Arc::new(vector_norm::VectorNormFunction));
|
||||||
registry.register(Arc::new(vector_dim::VectorDimFunction));
|
registry.register(Arc::new(vector_dim::VectorDimFunction));
|
||||||
registry.register(Arc::new(vector_subvector::VectorSubvectorFunction));
|
|
||||||
registry.register(Arc::new(elem_sum::ElemSumFunction));
|
registry.register(Arc::new(elem_sum::ElemSumFunction));
|
||||||
registry.register(Arc::new(elem_product::ElemProductFunction));
|
registry.register(Arc::new(elem_product::ElemProductFunction));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,240 +0,0 @@
|
|||||||
// Copyright 2023 Greptime Team
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
// See the License for the specific language governing permissions and
|
|
||||||
// limitations under the License.
|
|
||||||
|
|
||||||
use std::borrow::Cow;
|
|
||||||
use std::fmt::Display;
|
|
||||||
|
|
||||||
use common_query::error::{InvalidFuncArgsSnafu, Result};
|
|
||||||
use common_query::prelude::{Signature, TypeSignature};
|
|
||||||
use datafusion_expr::Volatility;
|
|
||||||
use datatypes::prelude::ConcreteDataType;
|
|
||||||
use datatypes::scalars::ScalarVectorBuilder;
|
|
||||||
use datatypes::vectors::{BinaryVectorBuilder, MutableVector, VectorRef};
|
|
||||||
use snafu::ensure;
|
|
||||||
|
|
||||||
use crate::function::{Function, FunctionContext};
|
|
||||||
use crate::scalars::vector::impl_conv::{as_veclit, as_veclit_if_const, veclit_to_binlit};
|
|
||||||
|
|
||||||
const NAME: &str = "vec_subvector";
|
|
||||||
|
|
||||||
/// Returns a subvector from start(included) to end(excluded) index.
|
|
||||||
///
|
|
||||||
/// # Example
|
|
||||||
///
|
|
||||||
/// ```sql
|
|
||||||
/// SELECT vec_to_string(vec_subvector("[1, 2, 3, 4, 5]", 1, 3)) as result;
|
|
||||||
///
|
|
||||||
/// +---------+
|
|
||||||
/// | result |
|
|
||||||
/// +---------+
|
|
||||||
/// | [2, 3] |
|
|
||||||
/// +---------+
|
|
||||||
///
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Default)]
|
|
||||||
pub struct VectorSubvectorFunction;
|
|
||||||
|
|
||||||
impl Function for VectorSubvectorFunction {
|
|
||||||
fn name(&self) -> &str {
|
|
||||||
NAME
|
|
||||||
}
|
|
||||||
|
|
||||||
fn return_type(&self, _input_types: &[ConcreteDataType]) -> Result<ConcreteDataType> {
|
|
||||||
Ok(ConcreteDataType::binary_datatype())
|
|
||||||
}
|
|
||||||
|
|
||||||
fn signature(&self) -> Signature {
|
|
||||||
Signature::one_of(
|
|
||||||
vec![
|
|
||||||
TypeSignature::Exact(vec![
|
|
||||||
ConcreteDataType::string_datatype(),
|
|
||||||
ConcreteDataType::int64_datatype(),
|
|
||||||
ConcreteDataType::int64_datatype(),
|
|
||||||
]),
|
|
||||||
TypeSignature::Exact(vec![
|
|
||||||
ConcreteDataType::binary_datatype(),
|
|
||||||
ConcreteDataType::int64_datatype(),
|
|
||||||
ConcreteDataType::int64_datatype(),
|
|
||||||
]),
|
|
||||||
],
|
|
||||||
Volatility::Immutable,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn eval(&self, _func_ctx: &FunctionContext, columns: &[VectorRef]) -> Result<VectorRef> {
|
|
||||||
ensure!(
|
|
||||||
columns.len() == 3,
|
|
||||||
InvalidFuncArgsSnafu {
|
|
||||||
err_msg: format!(
|
|
||||||
"The length of the args is not correct, expect exactly three, have: {}",
|
|
||||||
columns.len()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
let arg0 = &columns[0];
|
|
||||||
let arg1 = &columns[1];
|
|
||||||
let arg2 = &columns[2];
|
|
||||||
|
|
||||||
ensure!(
|
|
||||||
arg0.len() == arg1.len() && arg1.len() == arg2.len(),
|
|
||||||
InvalidFuncArgsSnafu {
|
|
||||||
err_msg: format!(
|
|
||||||
"The lengths of the vector are not aligned, args 0: {}, args 1: {}, args 2: {}",
|
|
||||||
arg0.len(),
|
|
||||||
arg1.len(),
|
|
||||||
arg2.len()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
let len = arg0.len();
|
|
||||||
let mut result = BinaryVectorBuilder::with_capacity(len);
|
|
||||||
if len == 0 {
|
|
||||||
return Ok(result.to_vector());
|
|
||||||
}
|
|
||||||
|
|
||||||
let arg0_const = as_veclit_if_const(arg0)?;
|
|
||||||
|
|
||||||
for i in 0..len {
|
|
||||||
let arg0 = match arg0_const.as_ref() {
|
|
||||||
Some(arg0) => Some(Cow::Borrowed(arg0.as_ref())),
|
|
||||||
None => as_veclit(arg0.get_ref(i))?,
|
|
||||||
};
|
|
||||||
let arg1 = arg1.get(i).as_i64();
|
|
||||||
let arg2 = arg2.get(i).as_i64();
|
|
||||||
let (Some(arg0), Some(arg1), Some(arg2)) = (arg0, arg1, arg2) else {
|
|
||||||
result.push_null();
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
|
|
||||||
ensure!(
|
|
||||||
0 <= arg1 && arg1 <= arg2 && arg2 as usize <= arg0.len(),
|
|
||||||
InvalidFuncArgsSnafu {
|
|
||||||
err_msg: format!(
|
|
||||||
"Invalid start and end indices: start={}, end={}, vec_len={}",
|
|
||||||
arg1,
|
|
||||||
arg2,
|
|
||||||
arg0.len()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
let subvector = &arg0[arg1 as usize..arg2 as usize];
|
|
||||||
let binlit = veclit_to_binlit(subvector);
|
|
||||||
result.push(Some(&binlit));
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(result.to_vector())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Display for VectorSubvectorFunction {
|
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
||||||
write!(f, "{}", NAME.to_ascii_uppercase())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
|
||||||
mod tests {
|
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
use common_query::error::Error;
|
|
||||||
use datatypes::vectors::{Int64Vector, StringVector};
|
|
||||||
|
|
||||||
use super::*;
|
|
||||||
use crate::function::FunctionContext;
|
|
||||||
#[test]
|
|
||||||
fn test_subvector() {
|
|
||||||
let func = VectorSubvectorFunction;
|
|
||||||
|
|
||||||
let input0 = Arc::new(StringVector::from(vec![
|
|
||||||
Some("[1.0, 2.0, 3.0, 4.0, 5.0]".to_string()),
|
|
||||||
Some("[6.0, 7.0, 8.0, 9.0, 10.0]".to_string()),
|
|
||||||
None,
|
|
||||||
Some("[11.0, 12.0, 13.0]".to_string()),
|
|
||||||
]));
|
|
||||||
let input1 = Arc::new(Int64Vector::from(vec![Some(1), Some(0), Some(0), Some(1)]));
|
|
||||||
let input2 = Arc::new(Int64Vector::from(vec![Some(3), Some(5), Some(2), Some(3)]));
|
|
||||||
|
|
||||||
let result = func
|
|
||||||
.eval(&FunctionContext::default(), &[input0, input1, input2])
|
|
||||||
.unwrap();
|
|
||||||
|
|
||||||
let result = result.as_ref();
|
|
||||||
assert_eq!(result.len(), 4);
|
|
||||||
assert_eq!(
|
|
||||||
result.get_ref(0).as_binary().unwrap(),
|
|
||||||
Some(veclit_to_binlit(&[2.0, 3.0]).as_slice())
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
result.get_ref(1).as_binary().unwrap(),
|
|
||||||
Some(veclit_to_binlit(&[6.0, 7.0, 8.0, 9.0, 10.0]).as_slice())
|
|
||||||
);
|
|
||||||
assert!(result.get_ref(2).is_null());
|
|
||||||
assert_eq!(
|
|
||||||
result.get_ref(3).as_binary().unwrap(),
|
|
||||||
Some(veclit_to_binlit(&[12.0, 13.0]).as_slice())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
#[test]
|
|
||||||
fn test_subvector_error() {
|
|
||||||
let func = VectorSubvectorFunction;
|
|
||||||
|
|
||||||
let input0 = Arc::new(StringVector::from(vec![
|
|
||||||
Some("[1.0, 2.0, 3.0]".to_string()),
|
|
||||||
Some("[4.0, 5.0, 6.0]".to_string()),
|
|
||||||
]));
|
|
||||||
let input1 = Arc::new(Int64Vector::from(vec![Some(1), Some(2)]));
|
|
||||||
let input2 = Arc::new(Int64Vector::from(vec![Some(3)]));
|
|
||||||
|
|
||||||
let result = func.eval(&FunctionContext::default(), &[input0, input1, input2]);
|
|
||||||
|
|
||||||
match result {
|
|
||||||
Err(Error::InvalidFuncArgs { err_msg, .. }) => {
|
|
||||||
assert_eq!(
|
|
||||||
err_msg,
|
|
||||||
"The lengths of the vector are not aligned, args 0: 2, args 1: 2, args 2: 1"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_subvector_invalid_indices() {
|
|
||||||
let func = VectorSubvectorFunction;
|
|
||||||
|
|
||||||
let input0 = Arc::new(StringVector::from(vec![
|
|
||||||
Some("[1.0, 2.0, 3.0]".to_string()),
|
|
||||||
Some("[4.0, 5.0, 6.0]".to_string()),
|
|
||||||
]));
|
|
||||||
let input1 = Arc::new(Int64Vector::from(vec![Some(1), Some(3)]));
|
|
||||||
let input2 = Arc::new(Int64Vector::from(vec![Some(3), Some(4)]));
|
|
||||||
|
|
||||||
let result = func.eval(&FunctionContext::default(), &[input0, input1, input2]);
|
|
||||||
|
|
||||||
match result {
|
|
||||||
Err(Error::InvalidFuncArgs { err_msg, .. }) => {
|
|
||||||
assert_eq!(
|
|
||||||
err_msg,
|
|
||||||
"Invalid start and end indices: start=3, end=4, vec_len=3"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -111,7 +111,7 @@ impl Eq for LoggingOptions {}
|
|||||||
impl Default for LoggingOptions {
|
impl Default for LoggingOptions {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
dir: "./greptimedb_data/logs".to_string(),
|
dir: "/tmp/greptimedb/logs".to_string(),
|
||||||
level: None,
|
level: None,
|
||||||
log_format: LogFormat::Text,
|
log_format: LogFormat::Text,
|
||||||
enable_otlp_tracing: false,
|
enable_otlp_tracing: false,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ use servers::Mode;
|
|||||||
pub const DEFAULT_OBJECT_STORE_CACHE_SIZE: ReadableSize = ReadableSize::gb(5);
|
pub const DEFAULT_OBJECT_STORE_CACHE_SIZE: ReadableSize = ReadableSize::gb(5);
|
||||||
|
|
||||||
/// Default data home in file storage
|
/// Default data home in file storage
|
||||||
const DEFAULT_DATA_HOME: &str = "./greptimedb_data";
|
const DEFAULT_DATA_HOME: &str = "/tmp/greptimedb";
|
||||||
|
|
||||||
/// Object storage config
|
/// Object storage config
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||||
|
|||||||
@@ -285,20 +285,6 @@ impl Value {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cast Value to i64. Return None if value is not a valid int64 data type.
|
|
||||||
pub fn as_i64(&self) -> Option<i64> {
|
|
||||||
match self {
|
|
||||||
Value::Int8(v) => Some(*v as _),
|
|
||||||
Value::Int16(v) => Some(*v as _),
|
|
||||||
Value::Int32(v) => Some(*v as _),
|
|
||||||
Value::Int64(v) => Some(*v),
|
|
||||||
Value::UInt8(v) => Some(*v as _),
|
|
||||||
Value::UInt16(v) => Some(*v as _),
|
|
||||||
Value::UInt32(v) => Some(*v as _),
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Cast Value to u64. Return None if value is not a valid uint64 data type.
|
/// Cast Value to u64. Return None if value is not a valid uint64 data type.
|
||||||
pub fn as_u64(&self) -> Option<u64> {
|
pub fn as_u64(&self) -> Option<u64> {
|
||||||
match self {
|
match self {
|
||||||
@@ -309,6 +295,7 @@ impl Value {
|
|||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cast Value to f64. Return None if it's not castable;
|
/// Cast Value to f64. Return None if it's not castable;
|
||||||
pub fn as_f64_lossy(&self) -> Option<f64> {
|
pub fn as_f64_lossy(&self) -> Option<f64> {
|
||||||
match self {
|
match self {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ use crate::state::{become_follower, become_leader, StateRef};
|
|||||||
|
|
||||||
pub const TABLE_ID_SEQ: &str = "table_id";
|
pub const TABLE_ID_SEQ: &str = "table_id";
|
||||||
pub const FLOW_ID_SEQ: &str = "flow_id";
|
pub const FLOW_ID_SEQ: &str = "flow_id";
|
||||||
pub const METASRV_HOME: &str = "./greptimedb_data/metasrv";
|
pub const METASRV_HOME: &str = "/tmp/metasrv";
|
||||||
|
|
||||||
#[cfg(feature = "pg_kvbackend")]
|
#[cfg(feature = "pg_kvbackend")]
|
||||||
pub const DEFAULT_META_TABLE_NAME: &str = "greptime_metakv";
|
pub const DEFAULT_META_TABLE_NAME: &str = "greptime_metakv";
|
||||||
|
|||||||
17
src/mito2/src/cache/file_cache.rs
vendored
17
src/mito2/src/cache/file_cache.rs
vendored
@@ -53,8 +53,6 @@ pub(crate) struct FileCache {
|
|||||||
///
|
///
|
||||||
/// File id is enough to identity a file uniquely.
|
/// File id is enough to identity a file uniquely.
|
||||||
memory_index: Cache<IndexKey, IndexValue>,
|
memory_index: Cache<IndexKey, IndexValue>,
|
||||||
/// Capacity of the cache.
|
|
||||||
capacity: ReadableSize,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) type FileCacheRef = Arc<FileCache>;
|
pub(crate) type FileCacheRef = Arc<FileCache>;
|
||||||
@@ -105,7 +103,6 @@ impl FileCache {
|
|||||||
FileCache {
|
FileCache {
|
||||||
local_store,
|
local_store,
|
||||||
memory_index,
|
memory_index,
|
||||||
capacity,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,20 +198,6 @@ impl FileCache {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the available space in the file cache.
|
|
||||||
pub(crate) fn available_space(&self) -> u64 {
|
|
||||||
if self.capacity.as_bytes() > self.memory_index.weighted_size() {
|
|
||||||
self.capacity.as_bytes() - self.memory_index.weighted_size()
|
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the capacity of the file cache.
|
|
||||||
pub(crate) fn capacity(&self) -> u64 {
|
|
||||||
self.capacity.as_bytes()
|
|
||||||
}
|
|
||||||
|
|
||||||
async fn recover_inner(&self) -> Result<()> {
|
async fn recover_inner(&self) -> Result<()> {
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
let mut lister = self
|
let mut lister = self
|
||||||
|
|||||||
10
src/mito2/src/cache/write_cache.rs
vendored
10
src/mito2/src/cache/write_cache.rs
vendored
@@ -263,16 +263,6 @@ impl WriteCache {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the available space in the write cache.
|
|
||||||
pub(crate) fn available_space(&self) -> u64 {
|
|
||||||
self.file_cache.available_space()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns the capacity of the write cache.
|
|
||||||
pub(crate) fn capacity(&self) -> u64 {
|
|
||||||
self.file_cache.capacity()
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Uploads a Parquet file or a Puffin file to the remote object store.
|
/// Uploads a Parquet file or a Puffin file to the remote object store.
|
||||||
async fn upload(
|
async fn upload(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
//! Handling open request.
|
//! Handling open request.
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Instant;
|
|
||||||
|
|
||||||
use common_telemetry::info;
|
use common_telemetry::info;
|
||||||
use object_store::util::join_path;
|
use object_store::util::join_path;
|
||||||
@@ -25,18 +24,14 @@ use store_api::region_request::RegionOpenRequest;
|
|||||||
use store_api::storage::RegionId;
|
use store_api::storage::RegionId;
|
||||||
use table::requests::STORAGE_KEY;
|
use table::requests::STORAGE_KEY;
|
||||||
|
|
||||||
use crate::cache::file_cache::{FileType, IndexKey};
|
|
||||||
use crate::cache::write_cache::WriteCacheRef;
|
|
||||||
use crate::error::{
|
use crate::error::{
|
||||||
ObjectStoreNotFoundSnafu, OpenDalSnafu, OpenRegionSnafu, RegionNotFoundSnafu, Result,
|
ObjectStoreNotFoundSnafu, OpenDalSnafu, OpenRegionSnafu, RegionNotFoundSnafu, Result,
|
||||||
};
|
};
|
||||||
use crate::metrics::WRITE_CACHE_INFLIGHT_DOWNLOAD;
|
|
||||||
use crate::region::opener::RegionOpener;
|
use crate::region::opener::RegionOpener;
|
||||||
use crate::request::OptionOutputTx;
|
use crate::request::OptionOutputTx;
|
||||||
use crate::sst::location;
|
|
||||||
use crate::wal::entry_distributor::WalEntryReceiver;
|
use crate::wal::entry_distributor::WalEntryReceiver;
|
||||||
use crate::worker::handle_drop::remove_region_dir_once;
|
use crate::worker::handle_drop::remove_region_dir_once;
|
||||||
use crate::worker::{MitoRegionRef, RegionWorkerLoop, DROPPING_MARKER_FILE};
|
use crate::worker::{RegionWorkerLoop, DROPPING_MARKER_FILE};
|
||||||
|
|
||||||
impl<S: LogStore> RegionWorkerLoop<S> {
|
impl<S: LogStore> RegionWorkerLoop<S> {
|
||||||
async fn check_and_cleanup_region(
|
async fn check_and_cleanup_region(
|
||||||
@@ -123,7 +118,6 @@ impl<S: LogStore> RegionWorkerLoop<S> {
|
|||||||
let opening_regions = self.opening_regions.clone();
|
let opening_regions = self.opening_regions.clone();
|
||||||
let region_count = self.region_count.clone();
|
let region_count = self.region_count.clone();
|
||||||
let worker_id = self.id;
|
let worker_id = self.id;
|
||||||
let write_cache = self.cache_manager.write_cache().cloned();
|
|
||||||
opening_regions.insert_sender(region_id, sender);
|
opening_regions.insert_sender(region_id, sender);
|
||||||
common_runtime::spawn_global(async move {
|
common_runtime::spawn_global(async move {
|
||||||
match opener.open(&config, &wal).await {
|
match opener.open(&config, &wal).await {
|
||||||
@@ -132,17 +126,12 @@ impl<S: LogStore> RegionWorkerLoop<S> {
|
|||||||
region_count.inc();
|
region_count.inc();
|
||||||
|
|
||||||
// Insert the Region into the RegionMap.
|
// Insert the Region into the RegionMap.
|
||||||
let region = Arc::new(region);
|
regions.insert_region(Arc::new(region));
|
||||||
regions.insert_region(region.clone());
|
|
||||||
|
|
||||||
let senders = opening_regions.remove_sender(region_id);
|
let senders = opening_regions.remove_sender(region_id);
|
||||||
for sender in senders {
|
for sender in senders {
|
||||||
sender.send(Ok(0));
|
sender.send(Ok(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(write_cache) = write_cache {
|
|
||||||
prefetch_latest_ssts(region, write_cache).await;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
let senders = opening_regions.remove_sender(region_id);
|
let senders = opening_regions.remove_sender(region_id);
|
||||||
@@ -155,85 +144,3 @@ impl<S: LogStore> RegionWorkerLoop<S> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Download latest SSTs from the remote storage for the region.
|
|
||||||
async fn prefetch_latest_ssts(region: MitoRegionRef, write_cache: WriteCacheRef) {
|
|
||||||
let version = region.version();
|
|
||||||
// Sort ssts by time range in descending order.
|
|
||||||
let mut ssts: Vec<_> = version
|
|
||||||
.ssts
|
|
||||||
.levels()
|
|
||||||
.iter()
|
|
||||||
.flat_map(|level| level.files())
|
|
||||||
.collect();
|
|
||||||
ssts.sort_unstable_by(|left, right| right.time_range().1.cmp(&left.time_range().1));
|
|
||||||
|
|
||||||
let layer = region.access_layer.clone();
|
|
||||||
let region_id = region.region_id;
|
|
||||||
// Prefetch the latest SSTs.
|
|
||||||
let mut has_err = false;
|
|
||||||
let mut fetched = 0;
|
|
||||||
let mut downloaded_bytes = 0;
|
|
||||||
let start = Instant::now();
|
|
||||||
for sst in ssts {
|
|
||||||
if has_err || write_cache.available_space() <= write_cache.capacity() / 2 {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
WRITE_CACHE_INFLIGHT_DOWNLOAD.add(1);
|
|
||||||
|
|
||||||
let file_meta = sst.meta_ref();
|
|
||||||
let index_key = IndexKey::new(region_id, file_meta.file_id, FileType::Parquet);
|
|
||||||
let remote_path = location::sst_file_path(layer.region_dir(), file_meta.file_id);
|
|
||||||
let file_size = file_meta.file_size;
|
|
||||||
if let Err(err) = write_cache
|
|
||||||
.download(index_key, &remote_path, layer.object_store(), file_size)
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
common_telemetry::error!(
|
|
||||||
err; "Failed to download parquet file, region_id: {}, index_key: {:?}, remote_path: {}", region_id, index_key, remote_path
|
|
||||||
);
|
|
||||||
has_err = true;
|
|
||||||
} else {
|
|
||||||
fetched += 1;
|
|
||||||
downloaded_bytes += file_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
let is_index_exist = file_meta.exists_index();
|
|
||||||
if !has_err && is_index_exist {
|
|
||||||
let index_file_size = file_meta.index_file_size();
|
|
||||||
let index_file_index_key =
|
|
||||||
IndexKey::new(region_id, file_meta.file_id, FileType::Puffin);
|
|
||||||
let index_remote_path =
|
|
||||||
location::index_file_path(layer.region_dir(), file_meta.file_id);
|
|
||||||
// also download puffin file
|
|
||||||
if let Err(err) = write_cache
|
|
||||||
.download(
|
|
||||||
index_file_index_key,
|
|
||||||
&index_remote_path,
|
|
||||||
layer.object_store(),
|
|
||||||
index_file_size,
|
|
||||||
)
|
|
||||||
.await
|
|
||||||
{
|
|
||||||
common_telemetry::error!(
|
|
||||||
err; "Failed to download puffin file, region_id: {}, index_file_index_key: {:?}, index_remote_path: {}", region_id, index_file_index_key, index_remote_path
|
|
||||||
);
|
|
||||||
has_err = true;
|
|
||||||
} else {
|
|
||||||
fetched += 1;
|
|
||||||
downloaded_bytes += index_file_size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
WRITE_CACHE_INFLIGHT_DOWNLOAD.sub(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
common_telemetry::info!(
|
|
||||||
"region {} prefetched {} files with total {} bytes, elapsed: {:?}",
|
|
||||||
region_id,
|
|
||||||
fetched,
|
|
||||||
downloaded_bytes,
|
|
||||||
start.elapsed(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ async fn test_config() {
|
|||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
level = "debug"
|
level = "debug"
|
||||||
dir = "./greptimedb_data/test/logs"
|
dir = "/tmp/greptimedb/test/logs"
|
||||||
"#;
|
"#;
|
||||||
let rs = http_handler::config(State(GreptimeOptionsConfigState {
|
let rs = http_handler::config(State(GreptimeOptionsConfigState {
|
||||||
greptime_config_options: toml_str.to_string(),
|
greptime_config_options: toml_str.to_string(),
|
||||||
|
|||||||
@@ -37,16 +37,16 @@ common-telemetry.workspace = true
|
|||||||
common-test-util.workspace = true
|
common-test-util.workspace = true
|
||||||
common-time.workspace = true
|
common-time.workspace = true
|
||||||
common-wal.workspace = true
|
common-wal.workspace = true
|
||||||
datanode.workspace = true
|
datanode = { workspace = true }
|
||||||
datatypes.workspace = true
|
datatypes.workspace = true
|
||||||
dotenv.workspace = true
|
dotenv.workspace = true
|
||||||
flate2.workspace = true
|
flate2 = "1.0"
|
||||||
flow.workspace = true
|
flow.workspace = true
|
||||||
frontend = { workspace = true, features = ["testing"] }
|
frontend = { workspace = true, features = ["testing"] }
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
hyper-util = { workspace = true, features = ["tokio"] }
|
hyper-util = { workspace = true, features = ["tokio"] }
|
||||||
log-query.workspace = true
|
log-query = { workspace = true }
|
||||||
loki-proto.workspace = true
|
loki-proto.workspace = true
|
||||||
meta-client.workspace = true
|
meta-client.workspace = true
|
||||||
meta-srv = { workspace = true, features = ["mock"] }
|
meta-srv = { workspace = true, features = ["mock"] }
|
||||||
@@ -96,5 +96,5 @@ prost.workspace = true
|
|||||||
rand.workspace = true
|
rand.workspace = true
|
||||||
session = { workspace = true, features = ["testing"] }
|
session = { workspace = true, features = ["testing"] }
|
||||||
store-api.workspace = true
|
store-api.workspace = true
|
||||||
tokio-postgres.workspace = true
|
tokio-postgres = { workspace = true }
|
||||||
url = "2.3"
|
url = "2.3"
|
||||||
|
|||||||
@@ -326,53 +326,3 @@ FROM (
|
|||||||
| [7.0, 8.0, 9.0, 10.0] | 4 |
|
| [7.0, 8.0, 9.0, 10.0] | 4 |
|
||||||
+-----------------------+------------+
|
+-----------------------+------------+
|
||||||
|
|
||||||
SELECT vec_to_string(vec_subvector('[1.0,2.0,3.0,4.0,5.0]', 0, 3));
|
|
||||||
|
|
||||||
+-------------------------------------------------------------------------------+
|
|
||||||
| vec_to_string(vec_subvector(Utf8("[1.0,2.0,3.0,4.0,5.0]"),Int64(0),Int64(3))) |
|
|
||||||
+-------------------------------------------------------------------------------+
|
|
||||||
| [1,2,3] |
|
|
||||||
+-------------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
SELECT vec_to_string(vec_subvector('[1.0,2.0,3.0,4.0,5.0]', 5, 5));
|
|
||||||
|
|
||||||
+-------------------------------------------------------------------------------+
|
|
||||||
| vec_to_string(vec_subvector(Utf8("[1.0,2.0,3.0,4.0,5.0]"),Int64(5),Int64(5))) |
|
|
||||||
+-------------------------------------------------------------------------------+
|
|
||||||
| [] |
|
|
||||||
+-------------------------------------------------------------------------------+
|
|
||||||
|
|
||||||
SELECT v, vec_to_string(vec_subvector(v, 3, 5))
|
|
||||||
FROM (
|
|
||||||
SELECT '[1.0, 2.0, 3.0, 4.0, 5.0]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[-1.0, -2.0, -3.0, -4.0, -5.0, -6.0]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[4.0, 5.0, 6.0, 10, -8, 100]' AS v
|
|
||||||
) ORDER BY v;
|
|
||||||
|
|
||||||
+--------------------------------------+---------------------------------------------------+
|
|
||||||
| v | vec_to_string(vec_subvector(v,Int64(3),Int64(5))) |
|
|
||||||
+--------------------------------------+---------------------------------------------------+
|
|
||||||
| [-1.0, -2.0, -3.0, -4.0, -5.0, -6.0] | [-4,-5] |
|
|
||||||
| [1.0, 2.0, 3.0, 4.0, 5.0] | [4,5] |
|
|
||||||
| [4.0, 5.0, 6.0, 10, -8, 100] | [10,-8] |
|
|
||||||
+--------------------------------------+---------------------------------------------------+
|
|
||||||
|
|
||||||
SELECT vec_to_string(vec_subvector(v, 0, 5))
|
|
||||||
FROM (
|
|
||||||
SELECT '[1.1, 2.2, 3.3, 4.4, 5.5]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[-1.1, -2.1, -3.1, -4.1, -5.1, -6.1]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[4.0, 5.0, 6.0, 10, -8, 100]' AS v
|
|
||||||
) ORDER BY v;
|
|
||||||
|
|
||||||
+---------------------------------------------------+
|
|
||||||
| vec_to_string(vec_subvector(v,Int64(0),Int64(5))) |
|
|
||||||
+---------------------------------------------------+
|
|
||||||
| [-1.1,-2.1,-3.1,-4.1,-5.1] |
|
|
||||||
| [1.1,2.2,3.3,4.4,5.5] |
|
|
||||||
| [4,5,6,10,-8] |
|
|
||||||
+---------------------------------------------------+
|
|
||||||
|
|
||||||
|
|||||||
@@ -99,26 +99,3 @@ FROM (
|
|||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT '[7.0, 8.0, 9.0, 10.0]' AS v
|
SELECT '[7.0, 8.0, 9.0, 10.0]' AS v
|
||||||
) Order By vec_dim(v) ASC;
|
) Order By vec_dim(v) ASC;
|
||||||
|
|
||||||
SELECT vec_to_string(vec_subvector('[1.0,2.0,3.0,4.0,5.0]', 0, 3));
|
|
||||||
|
|
||||||
SELECT vec_to_string(vec_subvector('[1.0,2.0,3.0,4.0,5.0]', 5, 5));
|
|
||||||
|
|
||||||
SELECT v, vec_to_string(vec_subvector(v, 3, 5))
|
|
||||||
FROM (
|
|
||||||
SELECT '[1.0, 2.0, 3.0, 4.0, 5.0]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[-1.0, -2.0, -3.0, -4.0, -5.0, -6.0]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[4.0, 5.0, 6.0, 10, -8, 100]' AS v
|
|
||||||
) ORDER BY v;
|
|
||||||
|
|
||||||
SELECT vec_to_string(vec_subvector(v, 0, 5))
|
|
||||||
FROM (
|
|
||||||
SELECT '[1.1, 2.2, 3.3, 4.4, 5.5]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[-1.1, -2.1, -3.1, -4.1, -5.1, -6.1]' AS v
|
|
||||||
UNION ALL
|
|
||||||
SELECT '[4.0, 5.0, 6.0, 10, -8, 100]' AS v
|
|
||||||
) ORDER BY v;
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ common-error.workspace = true
|
|||||||
common-query.workspace = true
|
common-query.workspace = true
|
||||||
common-recordbatch.workspace = true
|
common-recordbatch.workspace = true
|
||||||
common-time.workspace = true
|
common-time.workspace = true
|
||||||
datatypes.workspace = true
|
datatypes = { workspace = true }
|
||||||
flate2.workspace = true
|
flate2 = "1.0"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
local-ip-address = "0.6"
|
local-ip-address = "0.6"
|
||||||
mysql = { version = "25.0.1", default-features = false, features = ["minimal", "rustls-tls"] }
|
mysql = { version = "25.0.1", default-features = false, features = ["minimal", "rustls-tls"] }
|
||||||
@@ -31,5 +31,5 @@ tar = "0.4"
|
|||||||
tempfile.workspace = true
|
tempfile.workspace = true
|
||||||
tinytemplate = "1.2"
|
tinytemplate = "1.2"
|
||||||
tokio.workspace = true
|
tokio.workspace = true
|
||||||
tokio-postgres.workspace = true
|
tokio-postgres = { workspace = true }
|
||||||
tokio-stream.workspace = true
|
tokio-stream.workspace = true
|
||||||
|
|||||||
Reference in New Issue
Block a user