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

Don't write and print out a message when meet empty batch #158

Closed

Conversation

CalvinNeo
Copy link
Member

What problem does this PR solve?

Issue Number: close pingcap/tiflash#5783

Problem Summary:

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

YangKeao and others added 30 commits March 19, 2022 16:58
close tikv#12235, ref tikv#12236

Shouldn't report config related errors when bucket is disabled.

Signed-off-by: youjiali1995 <[email protected]>
close tikv#12218

Use the results returned by the cpu limiter directly without extra processing

Signed-off-by: Xintao <[email protected]>
…2152)

close tikv#11915

tikv_worker_pending_task_total is a gauge. We should directly use its value
to represent the pending tasks instead of using rate(). This PR removes the
rate() on these metrics.

Signed-off-by: Yilin Chen <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
…eeded (tikv#12251)

close tikv#12232

raftstore: only persist merge target if the merge is known to be succeeded

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

Co-authored-by: Ti Chi Robot <[email protected]>
close tikv#12240

split the initializer from the endpoint

Signed-off-by: hi-rustin <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
close tikv#12198, close tikv#12202

update grpcio to fix UAF

Signed-off-by: Jay Lee <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
close tikv#11379, close tikv#11598, close tikv#12107

when memory usage is high water, add flow control on the append log entries.
disable log entry cache evict functions.

Signed-off-by: tier-cap <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
close tikv#12014

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

Co-authored-by: Ti Chi Robot <[email protected]>
Co-authored-by: disksing <[email protected]>
close tikv#12046

If a read index request travel too long in the network, a leader may receive the
request it sent when it's still follower and break the strict order pending read
assumption.

This PR solves the problem by ignoring invalid read states. It also adds a defense
check to ignore all ReadIndex messages when it's sent by current leader.

Signed-off-by: Jay Lee <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
ref tikv#11965

* Add `causal_ts` component for causal timestamp generation & management.
* Implement causal timestamp provider from "batch" TSO from PD (see `causal_ts::BatchTsoProvider`).
* Append timestamp to keys of RawKV in `QueryObserver.pre_propose_query`.
* Setup causal timestamp observer when API V2 enabled (comment out)

Signed-off-by: pingyu <[email protected]>
Signed-off-by: Andy Lok <[email protected]>

Co-authored-by: Andy Lok <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
close tikv#12322

Use generic to reduce duplicated code and extract KvEngineFactory
for reuse in tests and future usage.

Signed-off-by: Jay Lee <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>
ref tikv#11965, ref tikv#12207

Add APIVersion as generic parameter of `Storage`.

Signed-off-by: pingyu <[email protected]>
CalvinNeo and others added 25 commits July 4, 2022 15:28
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Introduce crate proxy_server for a decouple of component/server, it will be used to start a proxy service.
Introduce crate new-mock-engine-store as a new mock-engine-store plus a test_raftstore implementation for proxy. This will enable us to run mix-mode tests. Tests in tests/failpoints and tests/integrations are obsolete tests and will be removed once the refactor ends. New tests should be added in tests/proxy with support of new-mock-engine-store.
Introduce crate engine_tiflash as a new KvEngine. It currently just works like former RocksEngine, unless we enable compat_new_proxy. Since some PRs have not been merged in TiKV, we can only enable this feature in some tests in tests/proxy. It can not be enabled in formal codes, since it can filter some writes.
cherry pick newly merge TiKV PRs, aka on_empty_cmd.
Fix some bugs.

* f

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

* fix

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

* add engine_tiflash with this version of engine_rocks

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

* fmt

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

* add engine_tiflash actually

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

* fix

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

* fix some tests

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

* f

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

* it runs if we do_write everytime

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

* add ensure_no_common_unrecognized_keys to config checker

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

* reorg tests

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

* raftstore: Implement coprocessor observer on_empty_cmd (tikv#12851)

ref tikv#12849

Support new observers on_empty_cmd.

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

Co-authored-by: Ti Chi Robot <[email protected]>

* fix tests

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

* move proxy-related code in component/server into proxy_server

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

* move codes in component/server/src/setup.rs into proxy_server

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

* support new ffis in mock-engine-store and new-mock-engine-store

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

* add disclaimer

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

* enlength some test time

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

* Remove pub fields of PdCluster, add feature to origin import

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

* f

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

* add

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

Co-authored-by: Ti Chi Robot <[email protected]>
* f

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

* fix

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

* add engine_tiflash with this version of engine_rocks

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

* fmt

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

* add engine_tiflash actually

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

* fix

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

* fix some tests

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

* f

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

* it runs if we do_write everytime

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

* add ensure_no_common_unrecognized_keys to config checker

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

* reorg tests

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

* raftstore: Implement coprocessor observer on_empty_cmd (tikv#12851)

ref tikv#12849

Support new observers on_empty_cmd.

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

Co-authored-by: Ti Chi Robot <[email protected]>

* fix tests

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

* move proxy-related code in component/server into proxy_server

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

* move codes in component/server/src/setup.rs into proxy_server

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

* support new ffis in mock-engine-store and new-mock-engine-store

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

* add disclaimer

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

* enlength some test time

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

* f

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

* fmt

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

* fix tests

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

Co-authored-by: Ti Chi Robot <[email protected]>
We add support for new observer pre_exec in this PR.
We will filter ComputeHash and VerifyHash now.
We will firstly try flush then CompactLog if succeed.
and unsafe backoff

* raftstore: use force_send to send ApplyRes (tikv#13168)

close tikv#13160

Use force_send to send ApplyRes

Signed-off-by: 5kbpers <[email protected]>

Co-authored-by: Ti Chi Robot <[email protected]>

Co-authored-by: 5kbpers <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
close tikv#13217, ref tikv#13217

support cgroup limit memory in diagnostics service

Signed-off-by: Lloyd-Pottiger <[email protected]>

Co-authored-by: Lloyd-Pottiger <[email protected]>

Co-authored-by: Lloyd-Pottiger <[email protected]>
Co-authored-by: Calvin Neo <[email protected]>
)

* raftstore: Implement observer on_compute_engine_size (tikv#12948)

ref tikv#12849

Implement observer on_compute_engine_size

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

Co-authored-by: Xinye Tao <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>

* inc gc time

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

Co-authored-by: Xinye Tao <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
f
Signed-off-by: CalvinNeo <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Sep 5, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
4 out of 7 committers have signed the CLA.

✅ Lloyd-Pottiger
✅ heibaijian
✅ CalvinNeo
✅ hehechen
❌ tonyxuqqi
❌ pingyu
❌ ti-srebot
You have signed the CLA already but the status is still pending? Let us recheck it.

@CalvinNeo CalvinNeo closed this Sep 5, 2022
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.

Region is unavailable while scale up tiflash