Weny Xu
3197b8b535
feat: introduce default customizers ( #4831 )
...
* feat: introduce `DefaultHeartbeatHandlerGroupBuilderCustomizer` and `DefaultLeadershipChangeNotifierCustomizer`
* chore: code styling
2024-10-15 09:48:13 +00:00
zyy17
972c2441af
chore: bump promql-parser to v0.4.1 and use to_string() for EvalStmt ( #4832 )
...
chore: bump promql-parser to v0.4.1 and use to_string() for EvalStmt
2024-10-15 08:50:37 +00:00
Ning Sun
bb8b54b5d3
feat: add some s2 geo functions ( #4823 )
...
* feat: add first batch of s2 functions
* refactor: update reusable code from main
* test: add sqlness tests for s2
* feat: add tostring function for s2
* Update src/common/function/src/scalars/geo/s2.rs
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
* Apply suggestions from code review
* one more change
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2024-10-15 06:47:29 +00:00
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
v0.10.0-nightly-20241014
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
Ning Sun
4dea4cac47
refactor: change sqlness ports to avoid conflict with local instance ( #4794 )
2024-10-08 07:33:24 +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 >
v0.10.0-nightly-20241007
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
Yingwen
caf5f2c7a5
docs: add TM to logos ( #4789 )
2024-10-01 03:35:04 +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
v0.10.0-nightly-20240930
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
Lei, HUANG
0a82b12d08
fix(sqlness): sqlness isolation ( #4780 )
...
* fix: isolate logs
* fix: copy cases
* fix: clippy
2024-09-29 05:54:01 +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
discord9
0274e752ae
chore: make sure aws-lc-sys wouldn't be built ( #4767 )
...
* chore: make sure aws-lc-sys wouldn't be built
* fix: bash
* refactor: multiple line bash
2024-09-25 17:11:37 +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.
v0.10.0-cd4bf239d-20240925-1727244173
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
discord9
54f6e13d13
fix: Release CI & make rustls use ring ( #4750 )
...
* feat: new dev-build
* fix: copy
* chore: rm dbg run
* fix: binstall install script
* chore: typos
* fix: update useable image
* fix: properly uninstall gcc-9
* chore: another try
* chore: print current cc version
* chore: another try to release
* fix: use gcc-10 by `update-alternatives`
* chore: update dev-build image
* remove gcc-9 again and install make/cmake
* use new image
* alias gcc-10/g++-10 to every variant
* again.....
* fix....
* again release ....
* chore: remove auto remove
* feat: rustls default to ring
* chore: update Cargo.lock
* chore: update Cargo.lock
* Apply suggestions from code review
---------
Co-authored-by: Ruihang Xia <waynestxia@gmail.com >
2024-09-24 03:11:12 +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