Weny Xu
b5233e500b
feat: defer HeartbeatHandlerGroup construction and enhance LeadershipChangeNotifier ( #4826 )
...
* feat: enhance `HeartbeatHandlerGroup`
* chore: apply suggestions from CR
* chore: minor refactoring
* chore: code styling
* chore: apply suggestions from CR
2024-10-15 03:35:31 +00:00
Ruihang Xia
b61a388d04
refactor: replace info logs with debug logs in region server ( #4829 )
...
* refactor: replace info logs with debug logs in region server
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix: update error handling for closing and opening nonexistent regions
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-10-14 12:46:07 +00:00
Ruihang Xia
06e565d25a
feat: cache logical region's metadata ( #4827 )
...
* feat: cache logical region's metadata
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* feat: implement logical region locking for metadata operations
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix: correct typo in comment for MetadataRegion struct
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-10-14 08:44:13 +00:00
Yingwen
3b2ce31a19
feat: enable prof features by default ( #4815 )
...
* feat: enable prof by default
* docs: don't need to build with features
* feat: add common-pprof as optional dep for pprof feature
* build: remove optional
* feat: use dump_text
2024-10-14 03:32:47 +00:00
Ruihang Xia
a889ea88ca
fix: case sensitive for __field__ matcher ( #4822 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-10-14 03:18:59 +00:00
Yingwen
2f2b4b306c
feat!: implement interval type by multiple structs ( #4772 )
...
* define structs and methods
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* feat: re-implement interval types in time crate
* feat: use new
* feat: interval value
* feat: query crate interval
* feat: pg and mysql interval
* chore: remove unused imports
* chore: remove commented codes
* feat: make flow compile but may not work
* feat: flow datetime
* test: fix some tests
* test: fix some flow tests(WIP)
* chore: some fix test&docs
* fix: change interval order
* chore: remove unused codes
* chore: fix cilppy
* chore: now signature change
* chore: remove todo
* feat: update error message
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: discord9 <discord9@163.com >
2024-10-14 03:09:03 +00:00
jeremyhi
856c0280f5
feat: remove the distributed lock ( #4825 )
...
* feat: remove the distributed lock as we do not need it any more
* chore: delete todo comment
* chore: remove unused error
2024-10-12 09:04:22 +00:00
Ning Sun
aaa9b32908
feat: add more h3 functions ( #4770 )
...
* feat: add more h3 grid functions
* feat: add more traversal functions
* refactor: update some function definitions
* style: format
* refactor: avoid creating slice in nested loop
* feat: ensure column number and length
* refactor: fix lint warnings
* refactor: merge main
* Apply suggestions from code review
Co-authored-by: LFC <990479+MichaelScofield@users.noreply.github.com >
* Update src/common/function/src/scalars/geo/h3.rs
Co-authored-by: LFC <990479+MichaelScofield@users.noreply.github.com >
* style: format
---------
Co-authored-by: LFC <990479+MichaelScofield@users.noreply.github.com >
2024-10-11 17:57:54 +00:00
Weny Xu
4bb1f4f184
feat: introduce LeadershipChangeNotifier and LeadershipChangeListener ( #4817 )
...
* feat: introduce `LeadershipChangeNotifier`
* refactor: use `LeadershipChangeNotifier`
* chore: apply suggestions from CR
* chore: apply suggestions from CR
* chore: adjust log styling
2024-10-11 12:48:53 +00:00
Weny Xu
0f907ef99e
fix: correct table name formatting ( #4819 )
2024-10-11 11:32:15 +00:00
Ruihang Xia
a61c0bd1d8
fix: error in admin function is not formatted properly ( #4820 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-10-11 10:02:45 +00:00
Lei, HUANG
7dd0e3ab37
fix: Panic in UNION ALL queries ( #4796 )
...
* fix/union_all_panic:
Improve MetricCollector by incrementing level and fix underflow issue; add tests for UNION ALL queries
* chore: remove useless documentation
* fix/union_all_panic: Add order by clause to UNION ALL select queries in tests
2024-10-11 08:23:01 +00:00
Yingwen
d168bde226
feat!: move v1/prof API to debug/prof ( #4810 )
...
* feat!: move v1/prof to debug/prof
* docs: update readme
* docs: move prof docs to docs dir
* chore: update message
* feat!: remove v1/prof
* docs: update mem prof docs
2024-10-11 04:16:37 +00:00
jeremyhi
4b34f610aa
feat: information extension ( #4811 )
...
* feat: information extension
* Update manager.rs
Co-authored-by: Weny Xu <wenymedia@gmail.com >
* chore: by comment
---------
Co-authored-by: Weny Xu <wenymedia@gmail.com >
2024-10-11 03:13:49 +00:00
Weny Xu
695ff1e037
feat: expose RegionMigrationManagerRef ( #4812 )
...
* chore: expose `RegionMigrationProcedureTask`
* fix: fix typos
* chore: expose `tracker`
2024-10-11 02:40:51 +00:00
Yohan Wal
288fdc3145
feat: json_path_exists udf ( #4807 )
...
* feat: json_path_exists udf
* chore: fix comments
* fix: caution when copy&paste QAQ
2024-10-10 14:15:34 +00:00
discord9
a8ed3db0aa
feat: Merge sort Logical plan ( #4768 )
...
* feat(WIP): MergeSort
* wip
* feat: MergeSort LogicalPlan
* update sqlness result
* Apply suggestions from code review
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
* refactor: per review advice
* refactor: more per review
* chore: per review
---------
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2024-10-09 09:37:27 +00:00
Kaifeng Zheng
0dd11f53f5
feat: add json format output for http interface ( #4797 )
...
* feat: json output format for http
* feat: add json result test case
* fix: typo and refactor a piece of code
* fix: cargo check
* move affected_rows to top level
2024-10-09 07:11:57 +00:00
Ning Sun
19918928c5
feat: add function to aggregate path into a geojson path ( #4798 )
...
* feat: add geojson function to aggregate paths
* test: add sqlness results
* test: add sqlness
* refactor: corrected to aggregation function
* chore: update comments
* fix: make linter happy again
* refactor: rename to remove `geo` from `geojson` function name
The return type is not geojson at all. It's just compatible with geojson's
coordinates part and superset's deckgl path plugin.
2024-10-09 02:38:44 +00:00
shuiyisong
5f0a83b2b1
fix: ts conversion during transform phase ( #4790 )
...
* fix: allow ts conversion during transform phase
* chore: replace `unimplemented` with snafu
2024-10-08 17:54:44 +00:00
localhost
71a66d15f7
chore: add json write ( #4744 )
...
* chore: add json write
* chore: add test for write json log api
* chore: enhancement of Error Handling
* chore: fix by pr comment
* chore: fix by pr comment
* chore: enhancement of error content and add some doc
2024-10-08 12:11:09 +00:00
Weny Xu
2cdd103874
feat: introduce HeartbeatHandlerGroupBuilderCustomizer ( #4803 )
...
* feat: introduce `HeartbeatHandlerGroupBuilderFinalizer`
* chore: rename to `HeartbeatHandlerGroupBuilderCustomizer`
2024-10-08 09:02:06 +00:00
Kaifeng Zheng
a283e13da7
feat: set max log files to 720 by default, info log only ( #4787 )
...
* feat: set max log files to 720 by default, info log only
* expose max_log_files in tomls
* include dir info when panicing, limit max_log_files of err_log to 30, and that of slow_queries to opt.max_log_files
* fix clippy
* update config.md
* update expected config str
* limit err_log max files size to `max_log_files` too, include err info when panicing, put `max_l_f` in right position
* fix typos
* chore: config
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
---------
Co-authored-by: dennis zhuang <killme2008@gmail.com >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2024-10-04 18:05:40 +00:00
JohnsonLee
47a3277d12
feat: customize channel information for sqlness tests ( #4729 )
...
* feat: add pg and mysql server_address options
* feat: start pg and mysql server(standalone)
* feat: start pg and mysql in distribute
* feat: finally get there, specify postgres sqlness
* feat: support mysql sqlness
* fix: license
* fix: remove unused import
* fix: toml
* fix: clippy
* refactor: BeginProtocolInterceptorFactory to ProtocolInterceptorFactory
* fix: sqlness pg connect
* fix: clippy
* Apply suggestions from code review
Co-authored-by: Yingwen <realevenyag@gmail.com >
* fix: rustfmt
* fix: reconnect pg and mysql when restart
* test: add mysql related sqlness
* fix: wait for start while restarting
* fix: clippy
* fix: cargo lock conflict
fix: Cargo.lock conflict
* fix: usage of '@@tx_isolation' in sqlness
* fix: typos
* feat: retry with backoff when create client
* fix: use millisecond rather than microseconds in backoff
---------
Co-authored-by: Yingwen <realevenyag@gmail.com >
2024-10-04 09:26:57 +00:00
Weny Xu
c1e8084af6
feat: add add_handler_after, add_handler_before, replace_handler ( #4788 )
...
* feat: add `add_handler_after`, `add_handler_before`, `replace_handler`
* chore: apply suggestions from CR
* test: add more tests
* feat: use `Vec` instead of `LinkedList`
* Update src/meta-srv/src/lib.rs
Co-authored-by: Yingwen <realevenyag@gmail.com >
---------
Co-authored-by: Yingwen <realevenyag@gmail.com >
2024-09-30 08:53:59 +00:00
Weny Xu
6e776d5f98
feat: support to reject write after flushing ( #4759 )
...
* refactor: use `RegionRoleState` instead of `RegionState`
* feat: introducing `RegionLeaderState::Downgrading`
* refactor: introduce `set_region_role_state_gracefully`
* refactor: use `set_region_role` instead of `set_writable`
* feat: support to reject write after flushing
* fix: fix unit tests
* test: add unit test for `should_reject_write`
* chore: add comments
* chore: refine comments
* fix: fix unit test
* test: enable fuzz tests for Local WAL
* chore: add logs
* chore: rename `RegionStatus` to `RegionState`
* feat: introduce `DowngradingLeader`
* chore: rename
* refactor: refactor `set_role_state` tests
* test: ensure downgrading region will reject write
* chore: enhance logs
* chore: refine name
* chore: refine comment
* test: add tests for `set_role_role_state`
* fix: fix unit tests
* chore: apply suggestions from CR
* chore: apply suggestions from CR
2024-09-30 08:28:51 +00:00
zyy17
e39a9e6feb
feat: add StatementStatistics for slow query logging implementation ( #4719 )
...
* feat: log slow query
* feat: log slow query for sql
* refactor: add slow query logging options
* ci: fix errors
* feat: add StatementStatistics
* chore: revert modification of servers crate
* docs: update config docs
* fix: clippy errors
2024-09-30 03:26:50 +00:00
Weny Xu
77af4fd981
refactor: introduce HeartbeatHandlerGroupBuilder ( #4785 )
2024-09-30 02:56:53 +00:00
Yingwen
cd55202136
feat: unordered scanner scans data by time ranges ( #4757 )
...
* feat: define range meta
* feat: group ranges
* feat: split range
* feat: build ranges from the scan input
* feat: get partition range from range meta
* feat: build file range
* feat: unordered scan read by ranges
* feat: wip for mem ranges
* feat: build ranges
* feat: remove unused codes
* chore: update comments
* feat: update metrics
* chore: address review comments
* chore: debug assertion
2024-09-29 07:14:48 +00:00
Lei, HUANG
50cb59587d
chore: replace anymap with anymap2 ( #4781 )
2024-09-29 06:27:35 +00:00
LFC
d9f2f0ccf0
feat: add a new status code for "external" errors ( #4775 )
...
* feat: add a new status code for "external" errors
* Update src/auth/src/error.rs
Co-authored-by: shuiyisong <113876041+shuiyisong@users.noreply.github.com >
* support mysql cli cleartext auth
* resolve PR comments
---------
Co-authored-by: shuiyisong <113876041+shuiyisong@users.noreply.github.com >
2024-09-29 03:38:50 +00:00
Ning Sun
cedbbcf2b8
fix: update pgwire for potential issue with connection establish ( #4783 )
2024-09-28 19:27:31 +00:00
Ning Sun
d6be44bc7f
fix: dead loop on detecting postgres ssl handshake ( #4778 )
2024-09-28 01:39:29 +00:00
JohnsonLee
3a46c1b235
fix: use information_schema returns Unknown database ( #4774 )
...
* fix: use information_schema returns Unknown database 'information_schema'
* test: make sure 'use information_schma' successful
2024-09-27 23:15:48 +00:00
Lei, HUANG
934bc13967
feat(mito): limit compaction output file size ( #4754 )
...
* Commit Message
Clarify documentation for CompactionOutput struct
Updated the documentation for the `CompactionOutput` struct to specify that the output time range is only relevant for windowed compaction.
* Add max_output_file_size to TwcsPicker and TwcsOptions
- Introduced `max_output_file_size` to `TwcsPicker` struct and its logic to enforce output file size limits during compaction.
- Updated `TwcsOptions` to include `max_output_file_size` and adjusted related tests.
- Modified `new_picker` function to initialize `TwcsPicker` with the new `max_output_file_size` field.
* feat/limit-compaction-output-size:
Refactor compaction picker and TWCS to support append mode and improve options handling
- Update compaction picker to accept a reference to options and append mode flag
- Modify TWCS picker logic to consider append mode when filtering deleted rows
- Remove VersionControl usage in compactor and simplify return type
- Adjust enforce_max_output_size logic in TWCS picker to handle max output file size
- Add append mode flag to TwcsPicker struct
- Fix incorrect condition in TWCS picker for enforcing max output size
- Update region options tests to reflect new max output file size format (1GB and 7MB)
- Simplify InvalidTableOptionSnafu error handling in create_parser
- Add `compaction.twcs.max_output_file_size` to mito engine option keys
* resolve some comments
2024-09-27 11:17:36 +00:00
Weny Xu
4045298cb2
feat: add region_statistics table ( #4771 )
...
* refactor: introduce `region_statistic`
* refactor: move DatanodeStat related structs to common_meta
* chore: add comments
* feat: implement `list_region_stats` for `ClusterInfo` trait
* feat: add `region_statistics` table
* feat: add table_id and region_number fields
* chore: rename unused snafu
* chore: udpate sqlness results
* chore: avoid to print source in error msg
* chore: move `procedure_info` under `greptime` catalog
* chore: apply suggestions from CR
* Update src/common/meta/src/datanode.rs
Co-authored-by: jeremyhi <jiachun_feng@proton.me >
---------
Co-authored-by: jeremyhi <jiachun_feng@proton.me >
2024-09-27 09:54:52 +00:00
Lanqing Yang
cc4106cbd2
feat: protect datanode with concurrency limit. ( #4699 )
...
Adding parallelism in region server to protect datanode from query overload.
2024-09-27 06:12:57 +00:00
localhost
627a326273
refactor: Change the error type in the pipeline crate from String to Error ( #4763 )
...
* chore: in process
* chore: change pipeline crate error type
* chore: improve event error
* chore: fix by pr comment
* chore: use snafu context replace ok_or_else
* refactor: update snafu usage
---------
Co-authored-by: Ning Sun <sunng@protonmail.com >
2024-09-25 19:32:34 +00:00
Lei, HUANG
cd4bf239d0
chore: relax table name constraint ( #4766 )
...
chore/relax-table-name-constraint: Updated NAME_PATTERN to allow '@' and '#' characters and adjusted tests for new table name validation rules.
2024-09-25 02:45:18 +00:00
Ning Sun
e3c0b5482f
feat: returning warning instead of error on unsupported SET statement ( #4761 )
...
* feat: add capability to send warning to pgclient
* fix: refactor query context to carry query scope data
* feat: return a warning for unsupported postgres statement
2024-09-24 08:45:55 +00:00
Weny Xu
d1b252736d
refactor: unify the styling in create_or_alter_tables_on_demand ( #4756 )
...
* refactor: refactor `create_or_alter_tables_on_demand`
* chore: apply suggestions from CR
2024-09-24 03:48:16 +00:00
Ruihang Xia
5c64f0ce09
refactor!: simplify NativeType trait and remove percentile UDAF ( #4758 )
...
* refactor!: simplify NativeType trait and remove percentile UDAF
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove NativeType
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* recover a mis-deleted case
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-09-23 10:55:20 +00:00
Ruihang Xia
2feddca1cb
feat: include order by to commutativity rule set ( #4753 )
...
* feat: include order by to commutativity rule set
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* tune sqlness replace interceptor
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-09-23 08:35:06 +00:00
Ning Sun
0f99218386
feat: list/array/timezone support for postgres output ( #4727 )
...
* feat: list/array support for postgres output
* fix: implement time zone support for postgrsql
* feat: add a geohash function that returns array
* fix: typo
* fix: lint warnings
* test: add sqlness test
* refactor: check resolution range before convert value
* fix: test result for sqlness
* feat: upgrade pgwire apis
2024-09-22 02:39:38 +00:00
Weny Xu
163cea81c2
feat: migrate local WAL regions ( #4715 )
...
* feat: allow to flush region before migrating
* fix: fix unit tests
* feat: allow to set `flush_timeout`
* feat: skip to replay memtable
* fix: fix unit tests
* test: add more tests
* refactor: simplify timeout logical
* test: add unit tests
* test: add unit tests
* chore: update comments
* fix: fix unit tests
* fix: fmt and clippy
* feat: change default timeout to 30s
* fix: throw `ExceededDeadline` error
* test: add tests for `downgrade_region_with_retry`
* chore: apply suggestions from CR
* chore: apply suggestions from CR
* chore: apply suggestions from CR
* chore: update proto to `3633474`
* refactor: refactor `upgrade_region_with_retry`
* chore: apply suggestions from CR
2024-09-20 08:27:20 +00:00
taobo
0c9b8eb0d2
feat: improve observability for procedure ( #4675 )
...
* feat: improve observability for procedure
* fix: test error
* test: add sqlness test for information_schema.procedure_info
* fix: sqlness test error
* fix: cr comment
* chore: update proto version
* fix: apply cr comment
* update version
* fix: cr comment
* optimize procedure type output format
* upgrade dep version
* fix: clippy error
* fix: `procedure` borrowed error
* fix: optimize code
2024-09-20 06:07:53 +00:00
Ning Sun
75c6fad1a3
feat: add more h3 scalar functions ( #4707 )
...
* feat: add more h3 scalar functions
* chore: comment up
2024-09-20 04:19:50 +00:00
Yingwen
e12ffbeb2f
feat: flush other workers if still need flush ( #4746 )
2024-09-20 02:55:31 +00:00
Yingwen
f02410c39b
fix: disable field pruning in last non null mode ( #4740 )
...
* fix: don't prune fields in last non null mode
* test: add sqlness test for field pruning
* test: add flush
* refine implementation
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
2024-09-20 00:35:37 +00:00
Ruihang Xia
f5cf25b0db
refactor: remove DfPlan wrapper ( #4733 )
...
* refactor: remove DfPlan wrapper
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clean up
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove unused errors
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix test assertion
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-09-19 12:29:33 +00:00