Lei, HUANG
e9dd79d1d2
fix(mito2): compare primary key ranges across schema versions ( #9205 )
...
* fix(mito2): compare primary key ranges across schema versions
Bind FileHandle ranges to the pinned region schema and append cached constant defaults to historical Dense keys. Preserve raw SST statistics, reject inexact bounds, and avoid invalidating views for unrelated metadata changes.
Cover schema evolution, default changes, and tombstone retention through real compaction and reopen regressions.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* refactor(mito2): report invalid primary key ranges
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* refactor(mito2): scope primary key ranges to comparisons
Keep raw PK bounds only in FileHandleInner and move schema-aware mapping and caching into task-local comparison contexts.
Use explicit contexts for compaction overlap checks, window aggregation, and series scans. Preserve pinned-schema isolation, late statistics, and shared file lifecycle state without rebinding every handle.
Cover cache isolation across region owners and adapt range fixtures to real Dense encodings. All 1530 mito2 tests and Clippy for all targets with the testing feature pass.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* refactor(mito2): cache aligned primary key ranges per file
Replace task-local range maps with a single-slot cache in FileHandleInner, keyed by the target schema version. Preserve raw bounds for realignment across snapshots and default changes.
Share schema mappers across comparison paths and use copy-on-write SST lists for metadata updates. Simplify range mapping to accept encoded bounds and assert the same-table contract at the file accessor.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* docs(mito2): clarify primary key mapper schema snapshot
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* test(mito2): align primary key range fixtures with table contract
Remove obsolete cross-table fallback expectations after region validation became a caller contract. Give compaction fixtures matching table identities, including the active-window L1 scenario.
Clarify the mapper precondition and format the simplified alignment call. All 1530 mito2 tests and Clippy for all targets with the testing feature pass.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* test(mito2): enable filesystem GC in release unit tests
Let unit tests use the filesystem-backed object-store GC path regardless of optimization profile. Keep the production release GC selection unchanged.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* perf(mito-codec): skip release value decoding in PK prefix counts
Validate field values only in debug builds and unit tests while keeping boundary, truncation, and trailing-byte checks in every build.
Cover the linked library in debug and release integration tests, and verify that release unit tests still perform value validation.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* test(mito-codec): remove redundant prefix integration tests
Retain the codec unit tests and cross-schema compaction regressions while dropping the standalone build-profile test file and its release-only invalid-value expectation.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
* ci: wait for MySQL to accept authenticated TCP queries
Add a healthcheck using the configured test account and database. Docker Compose --wait previously only observed container startup because the fixture image had no healthcheck, allowing metasrv to connect before MySQL initialization completed.
Verify readiness with SELECT 1 over TCP rather than the initialization socket.
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
---------
Signed-off-by: Lei, HUANG <ratuthomm@gmail.com >
2026-09-20 14:30:12 +00:00
discord9
f5428f8a6a
test: regenerate expired TLS certificates for integration fixtures ( #9196 )
...
* test: regenerate expired TLS certificates for integration fixtures
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
* test: restore root.srl serial file for TLS fixtures
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
* chore(ci): update compatibility test window to v1.2.1
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
Signed-off-by: WenyXu <wenymedia@gmail.com >
* test: add proper TLS extensions to regenerated integration certificates
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
---------
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com >
Signed-off-by: WenyXu <wenymedia@gmail.com >
2026-09-16 13:48:30 +00:00
Weny Xu
144f83528d
test: renew etcd TLS certificates ( #8956 )
...
Signed-off-by: WenyXu <wenymedia@gmail.com >
2026-08-26 06:15:37 +00:00
Weny Xu
0a959f9920
feat: add TLS support for mysql backend ( #6979 )
...
* refactor: move etcd tls code to `common-meta`
Signed-off-by: WenyXu <wenymedia@gmail.com >
* refactor: move postgre pool logic to `utils::postgre`
Signed-off-by: WenyXu <wenymedia@gmail.com >
* feat: setup mysql ssl options
Signed-off-by: WenyXu <wenymedia@gmail.com >
* feat: add test for mysql backend with tls
Signed-off-by: WenyXu <wenymedia@gmail.com >
* refactor: simplify certs generation
Signed-off-by: WenyXu <wenymedia@gmail.com >
* chore: apply suggestions
Signed-off-by: WenyXu <wenymedia@gmail.com >
---------
Signed-off-by: WenyXu <wenymedia@gmail.com >
2025-09-16 13:46:37 +00:00
Weny Xu
7aba9a18fd
chore: add tests for postgre backend with tls ( #6973 )
...
* chore: add tests for postgre backend with tls
Signed-off-by: WenyXu <wenymedia@gmail.com >
* chore: minor
Signed-off-by: WenyXu <wenymedia@gmail.com >
* chore: apply suggestions
Signed-off-by: WenyXu <wenymedia@gmail.com >
---------
Signed-off-by: WenyXu <wenymedia@gmail.com >
2025-09-16 11:03:11 +00:00
liyang
e595885dc6
chore: use greptime dockerhub image ( #6865 )
...
Signed-off-by: liyang <daviderli614@gmail.com >
2025-09-01 11:07:26 +00:00
liyang and zyy17
7bc669e991
chore: update bitnami config ( #6847 )
...
* chore: update bitnami config
Signed-off-by: liyang <daviderli614@gmail.com >
* update postgresql chart version
Signed-off-by: liyang <daviderli614@gmail.com >
* fix ci
Signed-off-by: liyang <daviderli614@gmail.com >
* refactor: add pull-test-deps-images.sh to pull images one by one to avoid rate limit
Signed-off-by: zyy17 <zyylsxm@gmail.com >
---------
Signed-off-by: liyang <daviderli614@gmail.com >
Signed-off-by: zyy17 <zyylsxm@gmail.com >
Co-authored-by: zyy17 <zyylsxm@gmail.com >
2025-08-29 02:45:14 +00:00
Logic and Weny Xu
cbcfdf9d65
feat: add optional schema for Postgres metadata tables ( #6764 )
...
* feat(meta): add optional schema for Postgres metadata tables
- Add `schema` option to specify a custom schema for metadata tables
- Update `PgStore` and `PgElection` to support optional schema
- Modify SQL templates to use schema when provided
- Add tests for schema support in Postgres backend
Signed-off-by: Logic <zqr10159@dromara.org >
* refactor(meta): remove unused `create_schema_statement` and simplify `PgSqlTemplateFactory`
- Remove `create_schema_statement` from `PgSqlTemplateSet` struct
- Simplify `PgSqlTemplateFactory` by removing `new` method and merging it with `with_schema`
- Update related tests to reflect these changes
Signed-off-by: Logic <zqr10159@dromara.org >
* refactor(meta-srv): remove unused imports
- Remove unused import of BoxedError from common_error::ext- Remove unused import of TlsOption from servers::tls
Signed-off-by: Logic <zqr10159@dromara.org >
* build(meta): update Postgres version and add error handling imports
- Update Postgres version to 17 in docker-compose.yml
- Add BoxedError import for error handling in meta-srv
Signed-off-by: Logic <zqr10159@dromara.org >
* feat(postgres): add support for optional schema in PgElection and related components
Signed-off-by: Logic <zqr10159@dromara.org >
* feat(postgres): add support for optional schema in PgElection and related components
Signed-off-by: Logic <zqr10159@dromara.org >
* fix(develop): update Postgres schema commands to specify host
Signed-off-by: Logic <zqr10159@dromara.org >
* refactor(postgres): simplify plugin options handling and update SQL examples
Signed-off-by: Logic <zqr10159@dromara.org >
* refactor(postgres): simplify plugin options handling and update SQL examples
Signed-off-by: Logic <zqr10159@dromara.org >
* fix(postgres): update meta_election_lock_id description for optional schema support
Signed-off-by: Logic <zqr10159@dromara.org >
* fix(postgres): add health check and fallback wait for Postgres in CI setup
* fix(postgres): update Docker setup for Postgres and add support for Postgres 15
* fix(postgres): remove redundant Postgres setup step in CI configuration
* Update tests-integration/fixtures/postgres/init.sql
Co-authored-by: Weny Xu <wenymedia@gmail.com >
* Update .github/workflows/develop.yml
* Update tests-integration/fixtures/docker-compose.yml
* Update src/common/meta/src/kv_backend/rds/postgres.rs
Co-authored-by: Weny Xu <wenymedia@gmail.com >
* Update src/common/meta/src/kv_backend/rds/postgres.rs
Co-authored-by: Weny Xu <wenymedia@gmail.com >
* Update src/common/meta/src/kv_backend/rds/postgres.rs
Co-authored-by: Weny Xu <wenymedia@gmail.com >
* Update src/common/meta/src/kv_backend/rds/postgres.rs
Co-authored-by: Weny Xu <wenymedia@gmail.com >
* fix: Refactor PostgreSQL backend to support optional schema in PgStore and related SQL templates
* feat: Update PostgreSQL configuration and add PG15 specific integration tests
* feat: Update PostgreSQL configuration and add PG15 specific integration tests
* refactor(postgres): update test schemas from 'greptime_schema' to 'test_schema'
* Update .github/workflows/develop.yml
* refactor: minor factor
Signed-off-by: WenyXu <wenymedia@gmail.com >
* chore: apply suggestions
Signed-off-by: WenyXu <wenymedia@gmail.com >
* fix: fix unit test
Signed-off-by: WenyXu <wenymedia@gmail.com >
---------
Signed-off-by: Logic <zqr10159@dromara.org >
Signed-off-by: WenyXu <wenymedia@gmail.com >
Co-authored-by: Weny Xu <wenymedia@gmail.com >
2025-08-28 09:24:14 +00:00
Yan Tingwang
32a3ef36f9
feat(metasrv): support tls for etcd client ( #6818 )
...
* add TLS support for etcd client connections~
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
* locate correct certs
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
* Updated certs
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
* Updated CI
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
* Updated CI
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
* Update docker-compose.yml
* tests for TLS client creation
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
* modify tests
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
---------
Signed-off-by: codephage2020 <tingwangyan2020@163.com >
2025-08-27 07:41:05 +00:00
Weny Xu
864cc117b3
fix: append noop entry when auto topic creation is disabled ( #6092 )
...
* feat: improve topic management and add stale records cleanup
* fix: fix unit tests
* chore: apply suggestions from CR
* chore: apply suggestions from CR
2025-05-16 11:26:47 +00:00
Weny Xu
30f1cbf0bf
chore: bump rskafka version ( #6090 )
...
* chore: upgrade rskafka
* chore(test): bump kafka version
2025-05-13 11:57:31 +00:00
Yohan Wal
af1920defc
feat: add mysql kvbackend ( #5528 )
...
* feat: add mysql kvbackend txn support
* chore: error handling
* chore: follow review comments
* chore: follow review comments
* chore: follow review comments
* revert: mysql QAQ
* revert: revert changes to sqls
This reverts commit cf98c50dd9 .
* chore: add comments
2025-03-12 06:52:56 +00:00
Ning Sun
ddf36c8324
ci: disable docker/rust cache temporarily and merge docker compose files ( #5293 )
...
* ci: disable docker cache temporarily and merge docker compose files
* ci: fix compose file name and options
* ci: try to disable rust cache
2025-01-06 08:23:46 +00:00
Lanqing Yang
93be81c041
feat: implement postgres kvbackend ( #4421 )
2024-08-14 22:49:32 +00:00
Weny Xu and Lei, HUANG
2e2eacf3b2
feat: add SASL and TLS config for Kafka client ( #4536 )
...
* feat: add SASL and TLS config
* feat: add SASL/PLAIN and TLS config for Kafka client
* chore: use `ring`
* feat: support SASL SCRAM-SHA-256 and SCRAM-SHA-512
* fix: correct unit test
* test: add integration test
* chore: apply suggestions from CR
* refactor: introduce `KafkaConnectionConfig`
* chore: refine toml examples
* docs: add missing fields
* chore: refine examples
* feat: allow no server ca cert
* chore: refine examples
* chore: fix clippy
* feat: load system ca certs
* chore: fmt toml
* chore: unpin version
* Update src/common/wal/src/error.rs
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
---------
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2024-08-12 12:27:11 +00:00
Weny Xu
a6269397c8
fix: fix EntityTooSmall issue ( #4100 )
...
* fix: fix EntityTooSmall issue
* chore(ci): add minio to coverage
* tests: add test for parquet writer
* chore: move tests to `common-datasource` crate
2024-06-04 08:43:33 +00:00
Ruihang Xia
b7ac8d6aa8
ci: use another mirror for etcd image ( #3486 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-03-11 10:40:19 +00:00
Weny Xu
e16f093282
test(remote_wal): add sqlness with kafka wal ( #3027 )
...
* feat(sqlness): add kafka wal config
* chore: add sqlness with kafka wal ci config
* fix: fix config
* chore: apply suggestions from CR
* fix: add metasrv config to sqlness with kafka
* fix: replay memtable should from flushed_entry_id + 1
* fix: should set append flag to fopen
* feat: start wal allocator in standalone meta mode
* feat: append a noop record after kafka topic initialization
* test: ignore tests temporally
* test: change sqlness kafka wal config
2023-12-29 08:17:22 +00:00
Weny Xu
89129c99c8
chore: setup kafka standalone in coverage test ( #2984 )
...
* chore: setup kafka standalone in coverage test
* test: add a naive test for topic manager
2023-12-25 11:18:54 +00:00
tison
ff8ab6763b
chore: internal ChrootKvBackend refactor and test ( #2799 )
...
* try avoid rate limit
Signed-off-by: tison <wander4096@gmail.com >
* chroot utilities as method
Signed-off-by: tison <wander4096@gmail.com >
* add test
Signed-off-by: tison <wander4096@gmail.com >
* make clippy happy
Signed-off-by: tison <wander4096@gmail.com >
---------
Signed-off-by: tison <wander4096@gmail.com >
2023-11-24 06:45:09 +00:00
tison and LFC
102e43aace
test: use EtcdStore in IT cases ( #2734 )
...
* test: use EtcdStore in IT cases
Signed-off-by: tison <wander4096@gmail.com >
* retrigger CI
Signed-off-by: tison <wander4096@gmail.com >
* refactor: KvPair can take etcd KeyValue
Signed-off-by: tison <wander4096@gmail.com >
* temporary use fork
Signed-off-by: tison <wander4096@gmail.com >
* drop cloned
Signed-off-by: tison <wander4096@gmail.com >
* chroot_key_value
Signed-off-by: tison <wander4096@gmail.com >
* chroot and prepend in each point
Signed-off-by: tison <wander4096@gmail.com >
* adjust call points
Signed-off-by: tison <wander4096@gmail.com >
* cargo clippy
Signed-off-by: tison <wander4096@gmail.com >
* point to upstream etcd-client
Signed-off-by: tison <wander4096@gmail.com >
* test etcd chroot
Signed-off-by: tison <wander4096@gmail.com >
* add NO_CHROOT constant
Signed-off-by: tison <wander4096@gmail.com >
* check
Signed-off-by: tison <wander4096@gmail.com >
* handle range end
Signed-off-by: tison <wander4096@gmail.com >
* handle special encoded key or range_end
Signed-off-by: tison <wander4096@gmail.com >
* fixup implementation
Signed-off-by: tison <wander4096@gmail.com >
* clippy
Signed-off-by: tison <wander4096@gmail.com >
* avoid test name conflict
Signed-off-by: tison <wander4096@gmail.com >
* chroot to kvbackend level
Signed-off-by: tison <wander4096@gmail.com >
* fixup all occurances
Signed-off-by: tison <wander4096@gmail.com >
* fix type
Signed-off-by: tison <wander4096@gmail.com >
* Update src/common/meta/src/kv_backend/txn.rs
* make github happy
---------
Signed-off-by: tison <wander4096@gmail.com >
Co-authored-by: LFC <990479+MichaelScofield@users.noreply.github.com >
2023-11-23 05:47:00 +00:00