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

Log GetCurrentTime failures during Flush and Compaction #3231

Closed
wants to merge 2 commits into from

Conversation

sagar0
Copy link
Contributor

@sagar0 sagar0 commented Dec 6, 2017

GetCurrentTime() is used to populate creation_time table property during flushes and compactions. It is safe to ignore GetCurrentTime() failures here but they should be logged.

(Note that creation_time property was introduced as part of TTL-based FIFO compaction in #2480.)

Tes Plan:
make check

@sagar0 sagar0 requested a review from ajkr December 6, 2017 21:38
@sagar0
Copy link
Contributor Author

sagar0 commented Dec 6, 2017

Fixing some tech debt from TTL-based FIFO compaction: T19827304 (internal).

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.

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

auto status = db_options_.env->GetCurrentTime(&_current_time);
// Safe to proceed even if GetCurrentTime fails. So, log and proceed.
if (!status.ok()) {
ROCKS_LOG_DEBUG(db_options_.info_log,
Copy link
Contributor

Choose a reason for hiding this comment

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

worth to be on warning level?

Copy link
Contributor

Choose a reason for hiding this comment

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

mention in the log the time is for getting creation_time in compactions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

all good points. Updated the patch with these suggestions.

db_options_.env->GetCurrentTime(&_current_time); // ignore error
auto status = db_options_.env->GetCurrentTime(&_current_time);
// Safe to proceed even if GetCurrentTime fails. So, log and proceed.
if (!status.ok()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@facebook-github-bot
Copy link
Contributor

@sagar0 has updated the pull request. View: changes, changes since last import

@ajkr
Copy link
Contributor

ajkr commented Dec 6, 2017

thanks!

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.

@sagar0 is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@sagar0 sagar0 deleted the log-current-time-failures branch December 7, 2017 22:04
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