[
https://issues.apache.org/jira/browse/HBASE-13128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14345130#comment-14345130
]
Sean Busbey commented on HBASE-13128:
-------------------------------------
{quote}
+ private static final int MAX_LOCK_FILE_ATTEMPTS = 5;
+ private static final int LOCK_FILE_ATTEMPT_SLEEP_INTERVAL = 200;
{quote}
can we name these DEFAULT_
{quote}
+ LOG.info("Failed to create lock file " + hbckLockFilePath.getName()
+ + ", try=" + (retryCounter.getAttemptTimes() + 1) + " of "
+ + retryCounter.getMaxAttempts());
+ LOG.debug(ioe);
{quote}
Please include a note in the debug message that the ioe is details from the
failure to create the lock file.
{quote}
- FileLockCallable callable = new FileLockCallable();
+ RetryCounter retryCounter = lockFileRetryCounterFactory.create();
{quote}
nit: whitespace error
{quote}
+ LOG.warn("Failed to delete " + HBCK_LOCK_PATH + ", try="
+ + (retryCounter.getAttemptTimes() + 1) + " of "
+ + retryCounter.getMaxAttempts());
+ LOG.debug(ioe);
{quote}
Keep the main message at INFO, to match the creation. Is th
Please include a note in the debug message that the ioe is details about
failing to delete the lock file.
{quote}
+ // If we reach here, then an exception was caught
+ if (fail) fail();
{quote}
Please assertFalse and include a message instead of the comment.
{quote}
+ /**
+ * This test makes sure that parallel instances of Hbck is disabled.
+ *
+ * @throws Exception
+ */
{quote}
The asserts at the end don't line up with this description. Don't we want one
of them to fail? Or are we trying to test that with retries 15 seconds is long
enough for the second instance to wait out the first?
{quote}
+ // Both should be successful
+ assertNotNull(h1);
+ assertNotNull(h2);
+ assert(h1.getRetCode() >= 0);
+ assert(h2.getRetCode() >= 0);
+
{quote}
> Make HBCK's lock file retry creation and deletion
> -------------------------------------------------
>
> Key: HBASE-13128
> URL: https://issues.apache.org/jira/browse/HBASE-13128
> Project: HBase
> Issue Type: Improvement
> Components: hbck
> Reporter: Victoria
> Assignee: Victoria
> Priority: Minor
> Attachments: hbck_files_fix-v1.patch, hbck_files_fix-v2.patch,
> hbck_files_fix.patch
>
>
> When hbck runs it creates a lock file to ensure that no two hbck instances
> are running. We've been seeing creating and removing that file fail sometimes.
> This improvement should make the creation, closing of the file, and the
> deletion retry multiple times. This should allow our alerting which uses this
> command to be more reliable and have fewer false positives.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)