discord9
7caa88abc7
refactor: flow replace check&better error msg ( #5277 )
...
* chore: better error msg
* chore eof newline
* refactor: move replace check to flow worker
* chore: add ctx to insert flow failure
* chore: Update src/flow/src/adapter/flownode_impl.rs
* test: add order by for deterministic
---------
Co-authored-by: Yingwen <realevenyag@gmail.com >
2025-01-04 02:12:27 +08:00
Lei, HUANG
eafb01dfff
chore: suppress list warning ( #5280 )
...
chore/suppress-list-warning:
### Update logging level in `intermediate.rs`
- Changed logging level from `warn` to `debug` for unexpected directory entries in index creation.
- Added `debug` to the `common_telemetry` import to support the logging level change.
2025-01-04 02:12:27 +08:00
yihong
b0de816d3d
fix: better fmt check from 40s to 4s ( #5279 )
...
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
2025-01-04 02:12:27 +08:00
Yingwen
5c6161a95e
feat: support add if not exists in the gRPC alter kind ( #5273 )
...
* test: test adding existing columns
* chore: add more checks to AlterKind
* chore: update logs
* fix: check and build table info first
* feat: Add add_if_not_exists flag to alter expr
* feat: skip existing columns when building alter kind
* checks in make_region_alter_kind()
* reuse the alter kind
* test: fix tests in common-meta
* chore: fix typos
* chore: update comments
2025-01-04 02:12:27 +08:00
discord9
5e3c5945c4
fix: flow handle reordered inserts ( #5275 )
...
* fix: reorder correct schema
* tests: reorder insert handled correctly
* chore: rm unused
* refactor: per review
* chore: more comment
* chore: per review
2025-01-04 02:12:27 +08:00
Yohan Wal
f6feac26f5
refactor: adjust index cache page size ( #5267 )
...
* refactor: adjust index cache page size
* fix: wrong docs
* Update config/datanode.example.toml
* Update config/config.md
* Update config/config.md
* chore: adjust to 64KiB
* Apply suggestions from code review
2025-01-04 02:12:27 +08:00
discord9
cf605ecccc
fix(flow): flow's table schema cache ( #5251 )
...
* fix: flow schema cache
* refactor: location for `to_meta_err`
* chore: endfile emptyline
* chore: review(partially)
* chore: per review
* refactor: per review
* refactor: per review
2025-01-04 02:12:27 +08:00
Ning Sun
ab3f9c42f1
fix: correct invalid testing feature gate usage ( #5258 )
...
* fix: correct invalid testing feature gate usage
* test: refactor tests to avoid test code leak
* fix: sync main
2025-01-04 02:12:27 +08:00
discord9
258fc6f31b
chore: typo ( #5265 )
...
* fix: a typo
* chore: even more typos
2025-01-04 02:12:27 +08:00
jeremyhi
e2dccc1d1a
feat: hints all in one ( #5194 )
...
* feat: hints all in one
* chore: If hints are provided in the x-greptime-hints header, ignore the rest of the headers
2025-01-04 02:12:27 +08:00
Ruihang Xia
78c5707642
feat(log-query): implement pagination with limit and offset parameters ( #5241 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
Ruihang Xia
e9f1fa0b7d
feat: override __sequence on creating SST to save space and CPU ( #5252 )
...
* override memtable sequence
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* override sst sequence
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* chore changes per to CR comments
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* use correct sequence number
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* wrap a method to get max sequence
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix typo
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
Yingwen
a988ff5acf
feat: update partition duration of memtable using compaction window ( #5197 )
...
* feat: update partition duration of memtable using compaction window
* chore: only use provided duration if it is not None
* test: more tests
* test: test compaction apply window
* style: fix clippy
2025-01-04 02:12:27 +08:00
zyy17
ef0fca9388
refactor: support to convert time string to timestamp in convert_value() ( #5242 )
...
refactor: support to covert time string to timestamp in convert_value()
2025-01-04 02:12:27 +08:00
Lin Yihai
b704e7f703
feat: add vec_div function ( #5245 )
2025-01-04 02:12:27 +08:00
Zhenchi
a22e8b421c
fix(bloom-filter): skip applying for non-indexed columns ( #5246 )
...
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
Yingwen
5b42546204
fix: implement a CacheStrategy to ensure compaction use cache correctly ( #5254 )
...
* feat: impl CacheStrategy
* refactor: replace Option<CacheManagerRef> with CacheStrategy
* feat: add disabled strategy
* ci: force update taplo
* refactor: rename CacheStrategy::Normal to CacheStrategy::EnableAll
* ci: force install cargo-gc-bin
* ci: force install
* chore: use CacheStrategy::Disabled as ScanInput default
* chore: fix compiler errors
2025-01-04 02:12:27 +08:00
shuiyisong
589cc84048
fix: disable path label in opendal for now ( #5247 )
...
* fix: remove path label in opendal for now
* fix: typo
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
---------
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
Kould
ed8c072a5e
feat(vector): add vector functions vec_sub & vec_sum & vec_elem_sum ( #5230 )
...
* feat(vector): add sub function
* chore: added check for vector length misalignment
* feat(vector): add `vec_sum` & `vec_elem_sum`
* chore: codefmt
* update lock file
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
Yohan Wal
9d172f1cae
feat: init PgElection with candidate registration ( #5209 )
...
* feat: init PgElection
fix: release advisory lock
fix: handle duplicate keys
chore: update comments
fix: unlock if acquired the lock
chore: add TODO and avoid unwrap
refactor: check both lock and expire time, add more comments
chore: fmt
fix: deal with multiple edge cases
feat: init PgElection with candidate registration
chore: fmt
chore: remove
* test: add unit test for pg candidate registration
* test: add unit test for pg candidate registration
* chore: update pg env
* chore: make ci happy
* fix: spawn a background connection thread
* chore: typo
* fix: shadow the election client for now
* fix: fix ci
* chore: readability
* chore: follow review comments
* refactor: use kvbackend for pg election
* chore: rename
* chore: make clippy happy
* refactor: use pg server time instead of local ones
* chore: typo
* chore: rename infancy to leader_infancy for clarification
* chore: clean up
* chore: follow review comments
* chore: follow review comments
* ci: unit test should test all features
* ci: fix
* ci: just test pg
2025-01-04 02:12:27 +08:00
Zhenchi
236888313d
feat(mito): add bloom filter read metrics ( #5239 )
...
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
Zhenchi
0b97ef0e4f
feat(config): add bloom filter config ( #5237 )
...
* feat(bloom-filter): integrate indexer with mito2
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* feat(config) add bloom filter config
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix docs
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* address comments
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix docs
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* merge
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* remove cache config
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
localhost
316e6a83eb
chore: add more info for pipeline dryrun API ( #5232 )
2025-01-04 02:12:27 +08:00
Ruihang Xia
6dc57b7a6c
feat(bloom-filter): bloom filter applier ( #5220 )
...
* wip
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* draft search logic
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* use defined BloomFilterReader
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* round the range end
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* finish index applier
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* integrate applier into mito2 with cache layer
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix cache key and add unit test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* provide bloom filter index size hint
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* revert BloomFilterReaderImpl::read_vec
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove dead code
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* ignore null on eq
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add more tests and fix bloom filter logic
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
discord9
1f5c2b32e5
fix: flow compare null values ( #5234 )
...
* fix: flow compare null values
* fix: fix again ck ty before cmp
* chore: rm comment
* fix: handle null
* chore: typo
* docs: update comment
* refactor: per review
* tests: more sqlness
* tests: sqlness not show create table
2025-01-04 02:12:27 +08:00
Zhenchi
01e907be40
feat(bloom-filter): integrate indexer with mito2 ( #5236 )
...
* feat(bloom-filter): integrate indexer with mito2
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* rename skippingindextype
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* address comments
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
Lin Yihai
e4dc5ea243
feat: Add vec_mul function. ( #5205 )
2025-01-04 02:12:27 +08:00
discord9
3ff5754b5a
feat(flow): check sink table mismatch on flow creation ( #5112 )
...
* tests: more mismatch errors
* feat: check sink table schema if exists&prompt nice err msg
* chore: rm unused variant
* chore: fmt
* chore: cargo clippy
* feat: check schema on create
* feat: better err msg when mismatch
* tests: fix a schema mismatch
* todo: create sink table
* feat: create sink table
* fix: find time index
* tests: auto created sink table
* fix: remove empty keys
* refactor: per review
* chore: fmt
* test: sqlness
* chore: after rebase
2025-01-04 02:12:27 +08:00
Ruihang Xia
c22ca3ebd5
feat: add some critical metrics to flownode ( #5235 )
...
* feat: add some critical metrics to flownode
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
zyy17
327d165ad9
feat: introduce the Limiter in frontend to limit the requests by in-flight write bytes size. ( #5231 )
...
feat: introduct Limiter to limit in-flight write bytes size in frontend
2025-01-04 02:12:27 +08:00
Zhenchi
be81f0db5a
feat(bloom-filter): impl batch push to creator ( #5225 )
...
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
Ruihang Xia
6ca7a305ae
fix: correct write cache's metric labels ( #5227 )
...
* refactor: remove unused field in WriteCache
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* refactor: unify read and write cache path
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update config and fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove unnecessary methods and adapt test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change the default path
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove remote-home
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
Weny Xu
1111a8bd57
chore: add log for converting region to follower ( #5222 )
...
* chore: add log for converting region to follower
* chore: apply suggestions from CR
2025-01-04 02:12:27 +08:00
Lei, HUANG
31cfab81ad
feat(mito): parquet memtable reader ( #4967 )
...
* wip: row group reader base
* wip: memtable row group reader
* Refactor MemtableRowGroupReader to streamline data fetching
- Added early return when fetch_ranges is empty to optimize performance.
- Replaced inline chunk data assignment with a call to `assign_dense_chunk` for cleaner code.
* wip: row group reader
* wip: reuse RowGroupReader
* wip: bulk part reader
* Enhance BulkPart Iteration with Filtering
- Introduced `RangeBase` to `BulkIterContext` for improved filter handling.
- Implemented filter application in `BulkPartIter` to prune batches based on predicates.
- Updated `SimpleFilterContext::new_opt` to be public for broader access.
* chore: add prune test
* fix: clippy
* fix: introduce prune reader for memtable and add more prune test
* Enhance BulkPart read method to return Option<BoxedBatchIterator>
- Modified `BulkPart::read` to return `Option<BoxedBatchIterator>` to handle cases where no row groups are selected.
- Added logic to return `None` when all row groups are filtered out.
- Updated tests to handle the new return type and added a test case to verify behavior when no row groups match the pr
* refactor/separate-paraquet-reader: Add helper function to parse parquet metadata and integrate it into BulkPartEncoder
* refactor/separate-paraquet-reader:
Change BulkPartEncoder row_group_size from Option to usize and update tests
* refactor/separate-paraquet-reader: Add context module for bulk memtable iteration and refactor part reading
• Introduce context module to encapsulate context for bulk memtable iteration.
• Refactor BulkPart to use BulkIterContextRef for reading operations.
• Remove redundant code in BulkPart by centralizing context creation and row group pruning logic in the new context module.
• Create new file context.rs with structures and logic for handling iteration context.
• Adjust part_reader.rs and row_group_reader.rs to reference the new BulkIterContextRef.
* refactor/separate-paraquet-reader: Refactor RowGroupReader traits and implementations in memtable and parquet reader modules
• Rename RowGroupReaderVirtual to RowGroupReaderContext for clarity.
• Replace BulkPartVirt with direct usage of BulkIterContextRef in MemtableRowGroupReader.
• Simplify MemtableRowGroupReaderBuilder by directly passing context instead of creating a BulkPartVirt instance.
• Update RowGroupReaderBase to use context field instead of virt, reflecting the trait renaming and usage.
• Modify FileRangeVirt to FileRangeContextRef and adjust implementations accordingly.
* refactor/separate-paraquet-reader: Refactor column page reader creation and remove unused code
• Centralize creation of SerializedPageReader in RowGroupBase::column_reader method.
• Remove unused RowGroupCachedReader and related code from MemtableRowGroupPageFetcher.
• Eliminate redundant error handling for invalid column index in multiple places.
* chore: rebase main and resolve conflicts
* fix: some comments
* chore: resolve conflicts
* chore: resolve conflicts
2025-01-04 02:12:27 +08:00
Ruihang Xia
dd3a509607
chore: bump opendal to fork version to fix prometheus layer ( #5223 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
Weny Xu
d4cae6af1e
refactor: remove unnecessary wrap ( #5221 )
...
* chore: remove unnecessary arc
* chore: remove unnecessary box
2025-01-04 02:12:27 +08:00
Ruihang Xia
3fec71b5c0
feat: logs query endpoint ( #5202 )
...
* define endpoint
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* planner
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update lock file
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add unit test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix toml format
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* revert metric change
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update src/query/src/log_query/planner.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* fix compile
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* refactor and tests
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-01-04 02:12:27 +08:00
Zhenchi
9e31a6478b
feat(index-cache): abstract IndexCache to be shared by multi types of indexes ( #5219 )
...
* feat(index-cache): abstract `IndexCache` to be shared by multi types of indexes
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix typo
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix: remove added label
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* refactor: simplify cached reader impl
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* rename func
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
Zhenchi
68a05b38bd
feat(bloom-filter): add bloom filter reader ( #5204 )
...
* feat(bloom-filter): add bloom filter reader
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* chore: remove unused dep
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix conflict
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* address comments
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
Zhenchi
ee72ae8bd0
feat(bloom-filter): add memory control for creator ( #5185 )
...
* feat(bloom-filter): add memory control for creator
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* refactor: remove meaningless buf
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* feat: add codec for intermediate
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2025-01-04 02:12:27 +08:00
Ruihang Xia
1327e8809f
feat: bump opendal and switch prometheus layer to the upstream impl ( #5179 )
...
* feat: bump opendal and switch prometheus layer to the upstream impl
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove unused files
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix tests
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove unused things
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove root dir on recovering cache
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* filter out non-files entry in test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-01-04 02:12:27 +08:00
evenyag
1f7d9666b7
chore: Downgrade opendal for releasing 0.11.1
...
Revert "feat: bump opendal and switch prometheus layer to the upstream impl (#5179 )"
This reverts commit 422d18da8b .
2024-12-20 14:12:19 +08:00
discord9
ed8e418716
fix: auto created table ttl check ( #5203 )
...
* fix: auto created table ttl check
* tests: with hint
2024-12-20 14:12:19 +08:00
discord9
9e7121c1bb
fix(flow): batch builder with type ( #5195 )
...
* fix: typed builder
* chore: clippy
* chore: rename
* fix: unit tests
* refactor: per review
2024-12-20 14:12:19 +08:00
discord9
f5e743379f
feat: show flow's mem usage in INFORMATION_SCHEMA.FLOWS ( #4890 )
...
* feat: add flow mem size to sys table
* chore: rm dup def
* chore: remove unused variant
* chore: minor refactor
* refactor: per review
2024-12-20 14:12:19 +08:00
Ruihang Xia
6735e5867e
feat: bump opendal and switch prometheus layer to the upstream impl ( #5179 )
...
* feat: bump opendal and switch prometheus layer to the upstream impl
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove unused files
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix tests
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove unused things
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove root dir on recovering cache
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* filter out non-files entry in test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-12-20 14:12:19 +08:00
Weny Xu
925525726b
fix: ensure table route metadata is eventually rolled back on failure ( #5174 )
...
* fix: ensure table route metadata is eventually rolled back on procedure failure
* fix(fuzz): enhance procedure condition checking
* chore: add logs
* feat: close downgraded leader region actively
* chore: apply suggestions from CR
2024-12-20 14:12:19 +08:00
Ning Sun
6427682a9a
feat: show create postgresql foreign table ( #5143 )
...
* feat: add show create table for pg in parser
* feat: implement show create table operation
* fix: adopt upstream changes
2024-12-20 14:12:19 +08:00
Ruihang Xia
2d84cc8d87
refactor: remove unused symbols ( #5193 )
...
chore: remove unused symbols
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-12-20 14:12:19 +08:00
Ruihang Xia
443c600bd0
fix: validate matcher op for __name__ in promql ( #5191 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-12-20 14:12:19 +08:00