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

Stop applying writes when RocksDB requires delay #1300

Closed
spolitov opened this issue May 3, 2019 · 0 comments
Closed

Stop applying writes when RocksDB requires delay #1300

spolitov opened this issue May 3, 2019 · 0 comments
Assignees
Labels
kind/enhancement This is an enhancement of an existing feature

Comments

@spolitov
Copy link
Contributor

spolitov commented May 3, 2019

When there are too many SSTable files, RocksDB would delay or stop writes.
But we are trying to apply them while the replicate state update lock is taken.
And this lock would not be released for a long time, causing multiple threads to get stuck on it.

@spolitov spolitov added the kind/enhancement This is an enhancement of an existing feature label May 3, 2019
@spolitov spolitov self-assigned this May 3, 2019
@bmatican bmatican added this to To Do in YBase features via automation May 7, 2019
yugabyte-ci pushed a commit that referenced this issue May 14, 2019
Summary:
When there are too many SSTable files, RocksDB would delay or stop writes.
But we are trying to apply them while the replica state update lock is taken.
And this lock would not be released for a long time, causing multiple threads to get stuck on it.

Added ability to stop applying committed entries on the follower when a delay is required by RocksDB.

Also, the following minor fixes are being implemented:
1) Release lock while waiting to records to be written to the log, before sending a reply to UpdateConsensus.
2) Move flags that configures RocksDB options from `src/yb/rocksdb/util/options.cc` to `src/yb/docdb/docdb_rocksdb_util.cc`,
    since most of such flags already reside there.
3) Fix LongOperationTracker. Reference to queue top could be invalidated during condition wait.
4) Change incorrect op id comparisons to index comparison. We should not be using OpId comparisons to decide whether a record has been committed. Consider the sequence of committed operations: 1.1, 1.2, 2.3. Based on OpId comparisons we would also consider a "1.3" record (perhaps from another replica's log) committed, which would be incorrect.
5) Update thread annotations from boost.

Test Plan: ybd --gtest_filter QLStressTest.DelayWrite

Reviewers: hector, amitanand, mikhail

Reviewed By: mikhail

Subscribers: rao, kannan, bogdan, ybase, bharat

Differential Revision: https://phabricator.dev.yugabyte.com/D6476
YBase features automation moved this from To Do to Done May 14, 2019
yugabyte-ci pushed a commit that referenced this issue May 15, 2019
Summary:
During build, we specify `-DSNAPPY` only while building rocksdb.
Because of it `Snappy_Supported` returns `false` when used outside RocksDB, because it is inline function.

So `InitRocksDBOptions` is unable to correctly initialize `compression` option and compression is disabled,
even when it is available.

Before D6476 we initialized compression in options.cc, so this issue did not appear.

This diff fixes the issue, by moving `-DSNAPPY` and other flags to root CMakeLists.txt.

Test Plan: ybd release --cxx-test redisserver_redisserver-test --gtest_filter TestRedisService.HugeCommandInline

Reviewers: timur, mikhail

Reviewed By: mikhail

Subscribers: kannan, ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D6621
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement This is an enhancement of an existing feature
Projects
Development

No branches or pull requests

1 participant