Skip to content

Commit

Permalink
Clean up some of the logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinjia committed Aug 5, 2015
1 parent f21e9ba commit a518fb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -107,8 +107,9 @@ public long lockBlock(long userId, long blockId, BlockLockType blockLockType) th
throw new IOException(ie.getMessage(), ie.getCause());
}
if (!success) {
LOG.error("Failed to lockBlock: " + blockId + " for user: " + userId + " in 1s.");
throw new IOException("Failed to lockBlock: " + blockId + " for user: " + userId + " in 1s.");
String errMsg = "Failed to lockBlock: " + blockId + " for user: " + userId + " in 5ms.";
LOG.error(errMsg);
throw new IOException(errMsg);
}
if (!mMetaManager.hasBlockMeta(blockId)) {
lock.unlock();
Expand Down
Expand Up @@ -197,7 +197,7 @@ private void handleMasterCommand(Command cmd) throws IOException {
try {
mBlockDataManager.removeBlock(Users.MASTER_COMMAND_USER_ID, block);
} catch (IOException ioe) {
LOG.warn("Failed to delete block instructed by master due to concurrent read.");
LOG.warn("Failed master delete block cmd for: " + block + " due to concurrent read.");
}
}
break;
Expand Down

0 comments on commit a518fb3

Please sign in to comment.