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

Ignore value of BackupableDBOptions::max_valid_backups_to_open when B… #6072

Closed

Conversation

sebastianopeluso
Copy link
Contributor

This change ignores the value of BackupableDBOptions::max_valid_backups_to_open when a BackupEngine is not read-only.

Issue: #4997

Note on tests: I had to remove test case WriteOnlyEngine of BackupableDBTest because it was not consistent with the new semantic of BackupableDBOptions::max_valid_backups_to_open. Maybe, we should think about adding a new interface for append-only BackupEngines. On the other hand, I changed LimitBackupsOpened test case to use a read-only BackupEngine, and I added a new specific test case for the change.

Copy link
Contributor

@pdillinger pdillinger left a comment

Choose a reason for hiding this comment

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

LGTM (prior in-person discussions /collaboration with Sebastiano)

We might resurrect the essence of BackupableDBTest.WriteOnlyEngine if we add a BackupEngineAppendOnly API variant.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@facebook-github-bot
Copy link
Contributor

@sebastianopeluso merged this pull request in fcd7e03.

dvdplm added a commit to dvdplm/rocksdb that referenced this pull request Nov 27, 2019
* upstream/master: (572 commits)
  Work around weird unused errors with Mingw (facebook#6075)
  Support options.max_open_files = -1 with periodic_compaction_seconds (facebook#6090)
  Fix HISTORY.md for 6.6.0 (facebook#6096)
  Expose and elaborate FilterBuildingContext (facebook#6088)
  Fix compilation under MSVC VS2015 (facebook#6081)
  Add shared library for musl-libc (facebook#3143)
  Refactor and clean up the code that reads a blob from a file (facebook#6093)
  Allow fractional bits/key in BloomFilterPolicy (facebook#6092)
  Refactor blob file creation logic (facebook#6066)
  Use lowercase for shlwapi.lib rpcrt4.lib (facebook#6076)
  Fix naming of library on PPC64LE (facebook#6080)
  Small improvements to Docker build for RocksJava (facebook#6079)
  Remove unused/undefined ImmutableCFOptions() (facebook#6086)
  Update 3rd-party libraries used by RocksJava (facebook#6084)
  Make default value of options.ttl to be 30 days when it is supported. (facebook#6073)
  Ignore value of BackupableDBOptions::max_valid_backups_to_open when B… (facebook#6072)
  Update HISTORY.md for forward compatibility (facebook#6085)
  Support ttl in Universal Compaction (facebook#6071)
  Fix the constness issues around autovector::iterator_impl's dereference operators (facebook#6057)
  Support options.ttl with options.max_open_files = -1 (facebook#6060)
  ...
pdillinger added a commit to pdillinger/rocksdb that referenced this pull request Nov 27, 2019
Summary: To reflect changes in PR facebook#6072

This comment also implies that a seemingly valid use-case for
max_valid_backups_to_open is flawed: even if you only want to add a new
backup without trying to delete, you might need to clean up after a
backup creation that never finished. To clean up properly requires
opening all backups to get proper ref counts on shared files.

Test Plan: code comment only
facebook-github-bot pushed a commit that referenced this pull request Nov 27, 2019
Summary:
To reflect changes in PR #6072

This comment also implies that a seemingly valid use-case for
max_valid_backups_to_open is flawed: even if you only want to add a new
backup without trying to delete, you might need to clean up after a
backup creation that never finished. To clean up properly requires
opening all backups to get proper ref counts on shared files.
Pull Request resolved: #6105

Test Plan: code comment only

Differential Revision: D18736716

Pulled By: pdillinger

fbshipit-source-id: 2447c0000eefe3a4ca606926bfe922a8456b0cb7
pdillinger added a commit that referenced this pull request Nov 27, 2019
Summary:
To reflect changes in PR #6072

This comment also implies that a seemingly valid use-case for
max_valid_backups_to_open is flawed: even if you only want to add a new
backup without trying to delete, you might need to clean up after a
backup creation that never finished. To clean up properly requires
opening all backups to get proper ref counts on shared files.
Pull Request resolved: #6105

Test Plan: code comment only

Differential Revision: D18736716

Pulled By: pdillinger

fbshipit-source-id: 2447c0000eefe3a4ca606926bfe922a8456b0cb7
wolfkdy pushed a commit to wolfkdy/rocksdb that referenced this pull request Dec 22, 2019
facebook#6072)

Summary:
This change ignores the value of BackupableDBOptions::max_valid_backups_to_open when a BackupEngine is not read-only.

Issue: facebook#4997

Note on tests: I had to remove test case WriteOnlyEngine of BackupableDBTest because it was not consistent with the new semantic of BackupableDBOptions::max_valid_backups_to_open. Maybe, we should think about adding a new interface for append-only BackupEngines. On the other hand, I changed LimitBackupsOpened test case to use a read-only BackupEngine, and I added a new specific test case for the change.
Pull Request resolved: facebook#6072

Reviewed By: pdillinger

Differential Revision: D18687364

Pulled By: sebastianopeluso

fbshipit-source-id: 77bc1f927d623964d59137a93de123bbd719da4e
wolfkdy pushed a commit to wolfkdy/rocksdb that referenced this pull request Dec 22, 2019
Summary:
To reflect changes in PR facebook#6072

This comment also implies that a seemingly valid use-case for
max_valid_backups_to_open is flawed: even if you only want to add a new
backup without trying to delete, you might need to clean up after a
backup creation that never finished. To clean up properly requires
opening all backups to get proper ref counts on shared files.
Pull Request resolved: facebook#6105

Test Plan: code comment only

Differential Revision: D18736716

Pulled By: pdillinger

fbshipit-source-id: 2447c0000eefe3a4ca606926bfe922a8456b0cb7
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.

None yet

3 participants