You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2013/12/24 07:18:40 UTC
[6/7] git commit: ACCUMULO-2082 fixed bug that allowed multiple
threads to attempt to compact a single tablet
ACCUMULO-2082 fixed bug that allowed multiple threads to attempt to compact a single tablet
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/db746960
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/db746960
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/db746960
Branch: refs/heads/master
Commit: db746960fbcafb1651c15ec2e5493d56acb5065c
Parents: 0d294ad
Author: Keith Turner <kt...@apache.org>
Authored: Tue Dec 24 01:13:06 2013 -0500
Committer: Keith Turner <kt...@apache.org>
Committed: Tue Dec 24 01:16:59 2013 -0500
----------------------------------------------------------------------
.../org/apache/accumulo/tserver/Tablet.java | 51 +++++++++++---------
1 file changed, 27 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/db746960/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
index f0fb524..3c62a86 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
@@ -3368,32 +3368,35 @@ public class Tablet {
majorCompactionInProgress = true;
}
- majCStats = _majorCompact(reason);
- if (reason == MajorCompactionReason.CHOP) {
- MetadataTableUtil.chopped(getExtent(), this.tabletServer.getLock());
- tabletServer.enqueueMasterMessage(new TabletStatusMessage(TabletLoadState.CHOPPED, extent));
- }
- } catch (CompactionCanceledException mcce) {
- log.debug("Major compaction canceled, extent = " + getExtent());
- throw new RuntimeException(mcce);
- } catch (Throwable t) {
- log.error("MajC Failed, extent = " + getExtent());
- log.error("MajC Failed, message = " + (t.getMessage() == null ? t.getClass().getName() : t.getMessage()), t);
- throw new RuntimeException(t);
- } finally {
- // ensure we always reset boolean, even
- // when an exception is thrown
- synchronized (this) {
- majorCompactionInProgress = false;
- this.notifyAll();
- }
+ try {
+ majCStats = _majorCompact(reason);
+ if (reason == MajorCompactionReason.CHOP) {
+ MetadataTableUtil.chopped(getExtent(), this.tabletServer.getLock());
+ tabletServer.enqueueMasterMessage(new TabletStatusMessage(TabletLoadState.CHOPPED, extent));
+ }
+ } catch (CompactionCanceledException mcce) {
+ log.debug("Major compaction canceled, extent = " + getExtent());
+ throw new RuntimeException(mcce);
+ } catch (Throwable t) {
+ log.error("MajC Failed, extent = " + getExtent());
+ log.error("MajC Failed, message = " + (t.getMessage() == null ? t.getClass().getName() : t.getMessage()), t);
+ throw new RuntimeException(t);
+ } finally {
+ // ensure we always reset boolean, even
+ // when an exception is thrown
+ synchronized (this) {
+ majorCompactionInProgress = false;
+ this.notifyAll();
+ }
- Span curr = Trace.currentTrace();
- curr.data("extent", "" + getExtent());
- if (majCStats != null) {
- curr.data("read", "" + majCStats.getEntriesRead());
- curr.data("written", "" + majCStats.getEntriesWritten());
+ Span curr = Trace.currentTrace();
+ curr.data("extent", "" + getExtent());
+ if (majCStats != null) {
+ curr.data("read", "" + majCStats.getEntriesRead());
+ curr.data("written", "" + majCStats.getEntriesWritten());
+ }
}
+ } finally {
span.stop();
}