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

Fix issues 1200 and 1295, add rocksdb_compact_lzero_now global variable #1309

Open
wants to merge 1 commit into
base: fb-mysql-8.0.28
Choose a base branch
from

Conversation

mdcallag
Copy link
Contributor

This fixes issue 1295 and has a workaround for issue 1200. #1200
#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:

  • rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
  • confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
  • don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

This fixes issue 1295 and has a workaround for issue 1200.
facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB
rather than assuming that L0 compacts into L1 because L1 might not be
the base level when dynamic leveled compaction is used -- in that case
the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for
1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now,
that when set will request L0 -> base_level compaction. This allows a client
to first set rocksdb_force_flush_memtable_now, wait for that to finish, then
set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match
  what is done for rocksdb_force_flush_memtable_and_lzero_now and
  rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed,
  that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done:
set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.
@mdcallag
Copy link
Contributor Author

I ran the rocksdb, rocksdb_rpl and rocksdb_sys_vars suites

@facebook-github-bot
Copy link

@hermanlee has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

rocksdb_flush_all_memtables();

// Try to avoid https://github.com/facebook/mysql-5.6/issues/1200
my_sleep(1000000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we wait for the rocksdb fix facebook/rocksdb#10428?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a PR to add a function to wait for compaction to finish. I don't see one for requesting L0->L1 compaction.
facebook/rocksdb#11436

}

static void rocksdb_force_flush_memtable_and_lzero_now_stub(
THD *const thd MY_ATTRIBUTE((__unused__)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could you omit "thd MY_ATTRIBUTE((unused))"? if you don't specify parameter name, c++ treat as unused parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the style used by existing code. I prefer to match it.

"RocksDB: Manual memtable and L0 flush.");
rocksdb_flush_all_memtables();

// Try to avoid https://github.com/facebook/mysql-5.6/issues/1200
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If two threads both try to set rocksdb_compact_lzero=1 or rocksdb_force_flush_memtable_and_lzero_now=1, will they hit similar race?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that by race I mean a performance issue, not a correctness issue:

  1. request memtable flush
  2. immediately request L0 -> L1 compaction
  3. wait for both to finish

If L0 -> L1 starts before memtable flush finishes then there might still be SSTs in the L0.

The "hack", sleep for 1 second in rocksdb_force_flush_memtable_and_lzero now between memtable flush and L0->L1 compaction, reduces the window for the race, but doesn't prevent it. There are other ways for the race to occur and I am reluctant to try and prevent them as any solution requires usage of a robust solution for waiting for compaction/flush to finish. Such a robust solution doesn't exist today. Hopefully it will in a few weeks or months. But even then I am still reluctant to try too hard to make this perfect.

It is more than good enough if I fix the bug WRT to getting the base level for L0->L1 compaction

facebook-github-bot pushed a commit that referenced this pull request May 25, 2023
…le (#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. #1200
#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: #1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d0
luqun pushed a commit to luqun/mysql-5.6 that referenced this pull request Jun 5, 2023
…ow global variable

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309
GitHub Author: Mark Callaghan <mdcallag@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Reviewers: mcallaghan, luqun, rpan, mung, yoshinori, chni

Reviewed By: luqun

Subscribers: webscalesql-eng@fb.com

Differential Revision: https://phabricator.intern.facebook.com/D45789784

Tags: accept2ship
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 14, 2023
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d0
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 19, 2023
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d0
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jun 23, 2023
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d0
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 3, 2023
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
hermanlee pushed a commit to hermanlee/mysql-5.6 that referenced this pull request Oct 18, 2023
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/percona-server that referenced this pull request Dec 20, 2023
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/percona-server that referenced this pull request Dec 20, 2023
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 15, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to percona/percona-server that referenced this pull request Jan 17, 2024
…le (#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 17, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/percona-server that referenced this pull request Jan 17, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/percona-server that referenced this pull request Feb 8, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Feb 9, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Feb 9, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Feb 12, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 12, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 12, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 12, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request Apr 15, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request May 13, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 15, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 16, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request May 24, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
oleksandr-kachan pushed a commit to oleksandr-kachan/percona-server that referenced this pull request May 27, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 30, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this pull request May 31, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this pull request Jun 5, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this pull request Jun 10, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this pull request Jun 12, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
VarunNagaraju pushed a commit to VarunNagaraju/percona-server that referenced this pull request Jun 12, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
@mdcallag
Copy link
Contributor Author

AFAIK the fix has been merged

inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 16, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 16, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 17, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 19, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 19, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Jul 25, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 30, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Jul 30, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 31, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 2, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 6, 2024
…le (facebook#1309)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook#1200
facebook#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook#1309

Differential Revision: D45789784
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Aug 21, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Aug 28, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Aug 30, 2024
…le (percona#1309)

Upstream commit ID: facebook/mysql-5.6@3ba4f39
PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951)

Summary:
This fixes issue 1295 and has a workaround for issue 1200. facebook/mysql-5.6#1200
facebook/mysql-5.6#1295

The fix for issue 1295 is to get the value of the base level from RocksDB rather than assuming that L0 compacts into L1 because L1 might not be the base level when dynamic leveled compaction is used -- in that case the base level can be Ln where n > 1 because L1 isn't needed yet.

There are two workarounds for issue 1200. The hacky one is to sleep for 1 second between requesting memtable flush and L0 -> base_level compaction.

The alternative is to add a new global variable, rocksdb_compact_lzero_now, that when set will request L0 -> base_level compaction. This allows a client to first set rocksdb_force_flush_memtable_now, wait for that to finish, then set rocksdb_compact_lzero_now.

Other changes:
* rocksdb_force_flush_memtable_now default value changed to OFF to match what is done for rocksdb_force_flush_memtable_and_lzero_now and rocksdb_compact_lzero_now
* confirm that the value to which these variables are set can be parsed, that wasn't done for all of them
* don't raise an error when these are set to OFF, that will be a no-op

Note: these variables are triggers, an action is taken when this is done: set global var = ON | true | 1

But these variables always show the value 0 (OFF, false). Their value doesn't change.

Pull Request resolved: facebook/mysql-5.6#1309

Differential Revision: D45789784

fbshipit-source-id: b5ab4d03a984cd0615ad2a828af80b7389b2508f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants