Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: log #2354

Closed

Conversation

killme2008
Copy link
Contributor

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

While reading the mito2 engine source code, make some minor changes.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

killme2008 and others added 30 commits August 30, 2023 19:16
* feat: only allow timestamp data type as time index

* test: update sqltest cases, todo: need some fixes

* fix: sqlness tests

* fix: forgot adding back cte test

* chore: style
* feat: rm compact and flush exprs

* refactor: continue to rm compact and flush
* retrieve region stats from region server

Signed-off-by: Ruihang Xia <[email protected]>

* implement heartbeat handler

Signed-off-by: Ruihang Xia <[email protected]>

* start datanode with region server

Signed-off-by: Ruihang Xia <[email protected]>

* remove comment

Signed-off-by: Ruihang Xia <[email protected]>

* disable non-unit test

Signed-off-by: Ruihang Xia <[email protected]>

* implement heartbeat task

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
chore: bump greptime-proto to replace region_dir

Signed-off-by: Ruihang Xia <[email protected]>
…eTeam#2296)

* feat: alias SchedulerRef and clean scheduler on drop

* feat: add scheduler to workers

* feat: use access layer to read write sst

* feat: add purger to region

* refactor: allow getting region_dir from AccessLayer

* feat: add scheduler to FlushScheduler

* feat: getter for object store

* chore: fix typo

Co-authored-by: Ruihang Xia <[email protected]>

---------

Co-authored-by: Ruihang Xia <[email protected]>
…2293)

* refactor: unify inserter

Signed-off-by: Zhenchi <[email protected]>

* feat(frontend): unify column inserter and row inserter

Signed-off-by: Zhenchi <[email protected]>

* fix: remove redundant clone

Signed-off-by: Zhenchi <[email protected]>

* fix: move empty check ahead

Signed-off-by: Zhenchi <[email protected]>

* feat: add more logs

Signed-off-by: Zhenchi <[email protected]>

* fix: leading license

Signed-off-by: Zhenchi <[email protected]>

* adjust indent

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
* feat: drop distributed Mito2 table

* rebase develop

* fix: resolve PR comments

* fix: resolve PR comments
* feat: kv backend on raft-engine

* feat: raft-engine kvbackend

* fix: toml

* fix: some review comments

* chore: optimize delete

* fix: lift lock in batch_delete
* feat: check delete request

* test: test delete and overwrite
refactor: use region_id instead of table&region_num in InactiveNodeManager
* refactor: refactor: ddl context

* refactor: remove unused code

* chore: apply suggestions from CR
* basic impl

Signed-off-by: Ruihang Xia <[email protected]>

* check in opening region

Signed-off-by: Ruihang Xia <[email protected]>

* fix typo

Signed-off-by: Ruihang Xia <[email protected]>

* add test

Signed-off-by: Ruihang Xia <[email protected]>

* fix clippy

Signed-off-by: Ruihang Xia <[email protected]>

* fix typo again

Signed-off-by: Ruihang Xia <[email protected]>

* Update src/mito2/src/worker/handle_drop.rs

Co-authored-by: JeremyHi <[email protected]>

* remove file in order

Signed-off-by: Ruihang Xia <[email protected]>

* fix remove logic

Signed-off-by: Ruihang Xia <[email protected]>

* use scan to list files

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
Co-authored-by: JeremyHi <[email protected]>
* chore: call handle_flush_request

* feat: alias SchedulerRef and clean scheduler on drop

* feat: add scheduler to workers

* feat: remove RegionMemtableStats

* feat: pick regions to flush

* feat: add more fields to region flush task

* feat: smallvec workspace dep

* feat: Use list to hold immutable memtables

* feat: flush job wip

* feat: use access layer to read write sst

* feat: flush memtables to l0

* feat: write manifest

* feat: schedule next flush on success

* feat: schedule flush on success and failure

* feat: add purger to region

* feat: apply edit after flush

* feat: collect stats for SSTs

* feat: manual flush

* test: test flush and fix manifest test

* feat: remove flush scheduler job limit

* fix: typo

* style: clippy

* feat: clean flushed files on failure

* chore: address CR comment

* refactor: Use put_rows

* feat: Clean flush scheduler on drop

* feat: remove region flush status on drop and close

* chore: address CR comment
* fix: filter out outdated heartbeat, GreptimeTeam#1707

* feat: reorder handlers

* refactor: disableXXX to enableXXX

* feat: make full use of region leases to facilitate failover

* chore: minor refactor

* chore: by comment

* feat: logging on inactive/active
* feat: add alloc_tracker for memtable

* chore: integrate WriteBufferManager
…reptimeTeam#2259)

* fix: LoadBase Selector cannot follow the region distribution rules

* chore: apply suggestions from CR
* refactor: remove scan request from memtable API

* docs: Update comment

---------

Co-authored-by: Yingwen <[email protected]>
…ptimeTeam#2308)

* fix: don't raise an error when manifest directory is not created

* chore: apply suggestion

Co-authored-by: Lei, HUANG <[email protected]>

---------

Co-authored-by: Lei, HUANG <[email protected]>
* fix: unused table options keys

* refactor: simplify validate table options

* chore: Add newlines

---------

Co-authored-by: Yingwen <[email protected]>
* feat: add write buffer manager to builder

* feat: impl WriteBufferManager

* feat: impl MemtableVersion::mutable_usage

* chore: Address CR comments

Co-authored-by: JeremyHi <[email protected]>

* refactor: rename mutable_limitation to mutable_limit

---------

Co-authored-by: JeremyHi <[email protected]>
* feat: build http client for s3/oss/azblob storages

* chore: style

* fix: test

* fix: cargo toml fmt
* feat: unify all protocol options

* feat: adds enable to example configs

* chore: style

Co-authored-by: JeremyHi <[email protected]>

---------

Co-authored-by: JeremyHi <[email protected]>
…2313)

* feat: add metric and manage tool for InactiveRegionKey

* chore: by review comment
* feat: adapt methods from RegionEngine for MitoEngine

Signed-off-by: Ruihang Xia <[email protected]>

* minor fixes

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
evenyag and others added 17 commits September 5, 2023 02:33
* feat(frontend): migrate insert to region server

Signed-off-by: Zhenchi <[email protected]>

* refactor: move converter to Inserter

Signed-off-by: Zhenchi <[email protected]>

* chore: rename convert function

Signed-off-by: Zhenchi <[email protected]>

* fix: address comments

Signed-off-by: Zhenchi <[email protected]>

* fix: address comments

Signed-off-by: Zhenchi <[email protected]>

* fix: add span id

Signed-off-by: Zhenchi <[email protected]>

* fix: compilation

Signed-off-by: Zhenchi <[email protected]>

* retrigger action

* retrigger action

---------

Signed-off-by: Zhenchi <[email protected]>
* refactor: refactor ddl manager

* chore: apply suggestions from CR
* feat: distributed alter table in region server

* rebase
…reptimeTeam#2324)

* feat(frontend): reorg insert converters and introduce stmt_to_region

Signed-off-by: Zhenchi <[email protected]>

* chore: shorten import path

Signed-off-by: Zhenchi <[email protected]>

* fix: add check for column count

Signed-off-by: Zhenchi <[email protected]>

* fix: clippy

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
* add do_get method to RegionRequestHandler

Signed-off-by: Ruihang Xia <[email protected]>

* move RegionRequestHandler to client crate

Signed-off-by: Ruihang Xia <[email protected]>

* use RegionRequestHandler in MergeScan

Signed-off-by: Ruihang Xia <[email protected]>

* minor fix

Signed-off-by: Ruihang Xia <[email protected]>

* ignore tests

Signed-off-by: Ruihang Xia <[email protected]>

* fix format

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
* fix: correct error message in validate_proto_value()

* fix: print location in InvalidRequest error

* style: format
* clean manifest

Signed-off-by: Ruihang Xia <[email protected]>

* clean engine

Signed-off-by: Ruihang Xia <[email protected]>

* clean region

Signed-off-by: Ruihang Xia <[email protected]>

* clean asscess_layer

Signed-off-by: Ruihang Xia <[email protected]>

* clean manifest manager

Signed-off-by: Ruihang Xia <[email protected]>

* clean row_converter

Signed-off-by: Ruihang Xia <[email protected]>

* clean scheduler

Signed-off-by: Ruihang Xia <[email protected]>

* clean worker

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
…2336)

* refactor: remove redundant code

* refactor: refactor RaftEngineBackend Error to common_meta::error::Error

* refactor: refactor state store

* chore: apply suggestions from CR
refactor: Optimize the timeout mechanism of the mailbox
…am#2322)

* feat: impl reject write

* feat: sanitize reject size

* feat: add should_stall to WriteBufferManager

* feat: stall requests

* test: mock WriteBufferManager

* feat: add new_with_manager for test and remove object_store from inner

* feat: add an event listener for tests

* feat: Use listener to test flush

* refactor: add flush_test.rs

* style: fix clippy

* feat: test write stall

* test: test flush empty
* feat(frontend): migrate delete to region server

Signed-off-by: Zhenchi <[email protected]>

* feat: add more check and do trim columns

Signed-off-by: Zhenchi <[email protected]>

* refactor: RegionRequestHandler.handle retrun AffectedRows

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
* basic impl

Signed-off-by: Ruihang Xia <[email protected]>

* refactor, collapse one layer

Signed-off-by: Ruihang Xia <[email protected]>

* add test

Signed-off-by: Ruihang Xia <[email protected]>

* remove old heartbeat handler impls

Signed-off-by: Ruihang Xia <[email protected]>

* remove old region alive keeper

Signed-off-by: Ruihang Xia <[email protected]>

* remove remote catalog manager

Signed-off-by: Ruihang Xia <[email protected]>

* global replace

Signed-off-by: Ruihang Xia <[email protected]>

* test countdown task

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
* refactor:
1. remove method `register_system_table` from CatalogManager
2. the creation of ScriptTable (as a system table) is removed from CatalogManager. Instead, the ScriptTable is created when Frontend instance is starting; and is created by calling Frontend instance's grpc handler.

* rebase
* pass nextest

Signed-off-by: Ruihang Xia <[email protected]>

* remove deadcode

Signed-off-by: Ruihang Xia <[email protected]>

* rename region_alive_keepers

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
@killme2008 killme2008 changed the base branch from develop to migrate-region-server September 12, 2023 02:46
@killme2008 killme2008 marked this pull request as ready for review September 12, 2023 02:47
@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #2354 (52b8f07) into develop (5df4d44) will decrease coverage by 7.34%.
Report is 7 commits behind head on develop.
The diff coverage is 50.24%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2354      +/-   ##
===========================================
- Coverage    85.20%   77.86%   -7.34%     
===========================================
  Files          715      724       +9     
  Lines       117523   115679    -1844     
===========================================
- Hits        100134    90073   -10061     
- Misses       17389    25606    +8217     

@waynexia waynexia force-pushed the migrate-region-server branch from 50cea29 to f1f7824 Compare September 12, 2023 12:23
@killme2008 killme2008 closed this Sep 12, 2023
@killme2008 killme2008 reopened this Sep 12, 2023
@killme2008 killme2008 changed the base branch from migrate-region-server to develop September 12, 2023 12:34
@killme2008 killme2008 changed the base branch from develop to admin September 12, 2023 12:58
@killme2008 killme2008 changed the base branch from admin to develop September 12, 2023 12:58
@killme2008 killme2008 closed this Sep 12, 2023
@killme2008 killme2008 deleted the feature/mito2-minor-changes branch January 16, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants