merge Prashanth's change
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/1af3985b Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/1af3985b Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/1af3985b Branch: refs/heads/master Commit: 1af3985b5fb574867ae423067b836d18e9374611 Parents: 681cad6 Author: mashengchen <[email protected]> Authored: Wed Mar 23 06:27:58 2016 +0000 Committer: mashengchen <[email protected]> Committed: Wed Mar 23 06:27:58 2016 +0000 ---------------------------------------------------------------------- .../transactional/TransactionManager.java | 44 +- .../TransactionRegionLocation.java | 12 + .../transactional/SplitBalanceHelper.java | 24 +- .../transactional/TrxRegionEndpoint.java.tmpl | 38 +- .../generated/TrxRegionProtos.java | 547 ++++++++++++------- .../transactional/TrxTransactionState.java.tmpl | 17 + .../hbase-trx/src/main/protobuf/TrxRegion.proto | 2 + core/sql/cli/SessionDefaults.cpp | 2 + core/sql/regress/core/DIFF116.KNOWN.SB | 21 - core/sql/sqlcomp/CmpSeabaseDDLschema.cpp | 39 +- 10 files changed, 504 insertions(+), 242 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java index b10214e..7eb03e7 100644 --- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java +++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionManager.java @@ -624,7 +624,9 @@ public class TransactionManager { */ public Integer doPrepareX(final byte[] regionName, final long transactionId, final int participantNum, final TransactionRegionLocation location) throws IOException, CommitUnsuccessfulException { - if (LOG.isTraceEnabled()) LOG.trace("doPrepareX -- ENTRY txid: " + transactionId ); + if (LOG.isTraceEnabled()) LOG.trace("doPrepareX -- ENTRY txid: " + transactionId + + " RegionName " + Bytes.toString(regionName) + + " TableName " + table.toString() ); int commitStatus = 0; boolean refresh = false; boolean retry = false; @@ -647,6 +649,7 @@ public class TransactionManager { builder.setRegionName(ByteString.copyFromUtf8(Bytes.toString(regionName))); builder.setParticipantNum(participantNum); + builder.setDropTableRecorded(location.isTableRecodedDropped()); instance.commitRequest(controller, builder.build(), rpcCallback); return rpcCallback.get(); } @@ -894,7 +897,9 @@ public class TransactionManager { } while (retryCount < RETRY_ATTEMPTS && retry == true); } - if (LOG.isTraceEnabled()) LOG.trace("commitStatus for transId(" + transactionId + "): " + commitStatus); + if (LOG.isTraceEnabled()) LOG.trace("commitStatus for transId(" + transactionId + "): " + commitStatus + + " TableName " + table.toString() + + " Region Name " + Bytes.toString(regionName)); boolean canCommit = true; boolean readOnly = false; @@ -944,7 +949,7 @@ public class TransactionManager { * Return : Ignored * Purpose : Call abort for a given regionserver */ - public Integer doAbortX(final byte[] regionName, final long transactionId, final int participantNum) throws IOException{ + public Integer doAbortX(final byte[] regionName, final long transactionId, final int participantNum, final boolean dropTableRecorded) throws IOException{ if(LOG.isDebugEnabled()) LOG.debug("doAbortX -- ENTRY txID: " + transactionId + " participantNum " + participantNum + " region " + regionName.toString()); boolean retry = false; @@ -968,6 +973,7 @@ public class TransactionManager { builder.setTransactionId(transactionId); builder.setParticipantNum(participantNum); builder.setRegionName(ByteString.copyFromUtf8(Bytes.toString(regionName))); + builder.setDropTableRecorded(dropTableRecorded); instance.abortTransaction(controller, builder.build(), rpcCallback); return rpcCallback.get(); } @@ -1983,7 +1989,7 @@ public class TransactionManager { public Integer call() throws CommitUnsuccessfulException, IOException { return doAbortX(location.getRegionInfo().getRegionName(), - transactionState.getTransactionId(), participantNum); + transactionState.getTransactionId(), participantNum, location.isTableRecodedDropped()); } }); completedList.add(location); @@ -2345,7 +2351,7 @@ public class TransactionManager { + participantNum + ", region: " + location.getRegionInfo().getRegionNameAsString()); threadPool.submit(new TransactionManagerCallable(transactionState, location, connection) { public Integer call() throws IOException { - return doAbortX(regionName, transactionState.getTransactionId(), participantNum); + return doAbortX(regionName, transactionState.getTransactionId(), participantNum, location.isTableRecodedDropped()); } }); } catch (Exception e) { @@ -2980,6 +2986,14 @@ public class TransactionManager { // Set transaction state object as participating in ddl transaction. transactionState.setDDLTx(true); + + // Also set a flag in all current participating regions belonging to this table + // to indicate this table is recorded for drop. + for(TransactionRegionLocation trl : transactionState.getParticipatingRegions()) + { + if(trl.getRegionInfo().getTable().toString().compareTo(tblName) == 0) + trl.setTableRecordedDropped(); + } } catch (Exception e) { LOG.error("dropTable Exception TxId: " + transactionState.getTransactionId() + "TableName:" + tblName + "Exception: " + e); @@ -2990,17 +3004,17 @@ public class TransactionManager { //Called only by Abort or Commit processing. public void deleteTable(final TransactionState transactionState, final String tblName) throws Exception{ - if (LOG.isTraceEnabled()) LOG.trace("deleteTable ENTRY, TxId: " + transactionState.getTransactionId() + "tableName" + tblName); + if (LOG.isTraceEnabled()) LOG.trace("deleteTable ENTRY, TxId: " + transactionState.getTransactionId() + " tableName " + tblName); try{ disableTable(transactionState, tblName); } catch (TableNotEnabledException e) { //If table is not enabled, no need to throw exception. Continue. //if (LOG.isTraceEnabled()) LOG.trace("deleteTable , TableNotEnabledException. This is a expected exception. Step: disableTable, TxId: " + - // transactionState.getTransactionId() + "TableName" + tblName + "Exception: " + e); + // transactionState.getTransactionId() + " TableName " + tblName + "Exception: " + e); } catch (Exception e) { - LOG.error("deleteTable Exception TxId: " + transactionState.getTransactionId() + "TableName" + tblName + "Exception: " + e); + LOG.error("deleteTable Exception TxId: " + transactionState.getTransactionId() + " TableName " + tblName + "Exception: " + e); throw e; } @@ -3008,7 +3022,7 @@ public class TransactionManager { hbadmin.deleteTable(tblName); } catch (Exception e) { - LOG.error("deleteTable Exception TxId: " + transactionState.getTransactionId() + "TableName" + tblName + "Exception: " + e); + LOG.error("deleteTable Exception TxId: " + transactionState.getTransactionId() + " TableName " + tblName + "Exception: " + e); throw e; } } @@ -3016,12 +3030,13 @@ public class TransactionManager { //Called only by Abort processing. public void enableTable(final TransactionState transactionState, String tblName) throws Exception{ - if (LOG.isTraceEnabled()) LOG.trace("enableTable ENTRY, TxID: " + transactionState.getTransactionId() + "tableName" + tblName); + if (LOG.isTraceEnabled()) LOG.trace("enableTable ENTRY, TxID: " + transactionState.getTransactionId() + " tableName " + tblName); try { hbadmin.enableTable(tblName); } catch (Exception e) { - LOG.error("enableTable Exception TxId: " + transactionState.getTransactionId() + "TableName" + tblName + "Exception: " + e); + //LOG.error("enableTable Exception TxId: " + transactionState.getTransactionId() + " TableName " + tblName + "Exception: " + e); + //Let the caller log this and handle exception. Some scenarios this exception is expected. throw e; } } @@ -3044,7 +3059,7 @@ public class TransactionManager { hbadmin.close(); } catch (Exception e) { - LOG.error("truncateTable Exception TxId: " + transactionState.getTransactionId() + "TableName" + tblName+ "Exception: " + e); + LOG.error("truncateTable Exception TxId: " + transactionState.getTransactionId() + " TableName " + tblName+ "Exception: " + e); throw e; } } @@ -3052,15 +3067,16 @@ public class TransactionManager { //Called only by DoPrepare. public void disableTable(final TransactionState transactionState, String tblName) throws Exception{ - if (LOG.isTraceEnabled()) LOG.trace("disableTable ENTRY, TxID: " + transactionState.getTransactionId() + "tableName" + tblName); + if (LOG.isTraceEnabled()) LOG.trace("disableTable ENTRY, TxID: " + transactionState.getTransactionId() + " tableName " + tblName); try { hbadmin.disableTable(tblName); } catch (Exception e) { - //LOG.error("disableTable Exception TxId: " + transactionState.getTransactionId() + "TableName" + tblName + "Exception: " + e); + //LOG.error("disableTable Exception TxId: " + transactionState.getTransactionId() + " TableName " + tblName + "Exception: " + e); //Let the caller handle this exception since table being disabled could be redundant many times. throw e; } + if (LOG.isTraceEnabled()) LOG.trace("disableTable EXIT, TxID: " + transactionState.getTransactionId() + " tableName " + tblName); } /** http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionRegionLocation.java ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionRegionLocation.java b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionRegionLocation.java index e2ff67b..d3118db 100644 --- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionRegionLocation.java +++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/client/transactional/TransactionRegionLocation.java @@ -37,6 +37,7 @@ public class TransactionRegionLocation extends HRegionLocation { static final Log LOG = LogFactory.getLog(TransactionRegionLocation.class); + public boolean tableRecordedDropped; /* public TransactionRegionLocation(HRegionInfo regionInfo, final String hostname, final int port) { //ServerName @@ -47,6 +48,17 @@ public class TransactionRegionLocation extends HRegionLocation { public TransactionRegionLocation(HRegionInfo regionInfo, ServerName servName) { super(regionInfo, servName); + tableRecordedDropped = false; + } + + public void setTableRecordedDropped() + { + tableRecordedDropped = true; + if (LOG.isTraceEnabled()) LOG.trace("Table recorded dropped for region:" + super.getRegionInfo()); + } + public boolean isTableRecodedDropped() + { + return tableRecordedDropped; } @Override http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java index d91565e..0d76b55 100644 --- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java +++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java @@ -215,7 +215,29 @@ public class SplitBalanceHelper { } protected boolean pendingListClear(Set<TrxTransactionState> commitPendingTransactions) throws IOException { - return commitPendingTransactions.isEmpty(); + if (commitPendingTransactions.isEmpty()) { + if (LOG.isDebugEnabled()) + LOG.debug("pendingListClear is true because commitPendingTransactions is empty " + hri.getRegionNameAsString()); + return true; + } else { + // Check to see if all of the TrxTransaction state objects + // have dropTable Recorded, in which case the pending list is + // considered clear of pending list. + for (TrxTransactionState transactionState : commitPendingTransactions) { + // if even one transaction state does not have drop table recorded + // then pendingList is not yet clear. + if (!transactionState.dropTableRecorded()) { + if (LOG.isDebugEnabled()) + LOG.debug("pendingListClear is false commitPendingTransactions is not empty " + + hri.getRegionNameAsString()); + return false; + } + } + // Reaching here means pendingListClear. + if (LOG.isDebugEnabled()) + LOG.debug("pendingListClear is true because dropTableRecorded is true " + hri.getRegionNameAsString()); + return true; + } } protected boolean scannersListClear(ConcurrentHashMap<Long, TransactionalRegionScannerHolder> scanners) throws IOException { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl index 9c14965..b0e87d3 100644 --- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl +++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/TrxRegionEndpoint.java.tmpl @@ -427,8 +427,9 @@ CoprocessorService, Coprocessor { AbortTransactionResponse response = AbortTransactionResponse.getDefaultInstance(); long transactionId = request.getTransactionId(); - - if (LOG.isTraceEnabled()) LOG.trace("TrxRegionEndpoint coprocessor: abortTransaction - txId " + transactionId + ", regionName " + regionInfo.getRegionNameAsString()); + boolean dropTableRecorded = request.getDropTableRecorded(); + if (LOG.isTraceEnabled()) LOG.trace("TrxRegionEndpoint coprocessor: abortTransaction - txId " + transactionId + + ", dropTableRecoded " + dropTableRecorded + ", regionName " + regionInfo.getRegionNameAsString()); IOException ioe = null; UnknownTransactionException ute = null; @@ -440,7 +441,7 @@ CoprocessorService, Coprocessor { // First test if this region matches our region name if (!name.equals(regionInfo.getRegionNameAsString())) { - wre = new WrongRegionException("Request Region Name, " + + wre = new WrongRegionException("Request Region Name, " + name + ", does not match this region, " + regionInfo.getRegionNameAsString()); if (LOG.isTraceEnabled()) LOG.trace("TrxRegionEndpoint coprocessor:abortTransaction threw WrongRegionException" + @@ -452,7 +453,7 @@ CoprocessorService, Coprocessor { { // Process in local memory try { - abortTransaction(transactionId); + abortTransaction(transactionId, dropTableRecorded); } catch (UnknownTransactionException u) { if (LOG.isDebugEnabled()) LOG.debug("TrxRegionEndpoint coprocessor:abort - txId " + transactionId @@ -848,9 +849,11 @@ CoprocessorService, Coprocessor { WrongRegionException wre = null; long transactionId = request.getTransactionId(); int participantNum = request.getParticipantNum(); + boolean dropTableRecorded = request.getDropTableRecorded(); if (LOG.isTraceEnabled()) LOG.trace("TrxRegionEndpoint coprocessor: commitRequest - txId " - + transactionId + ", participantNum " + participantNum + ", regionName " + regionInfo.getRegionNameAsString()); + + transactionId + ", participantNum " + participantNum + ", dropTableRecorded " + dropTableRecorded + + ", regionName " + regionInfo.getRegionNameAsString()); /* commenting out for the time being java.lang.String name = ((com.google.protobuf.ByteString) request.getRegionName()).toStringUtf8(); @@ -868,7 +871,7 @@ CoprocessorService, Coprocessor { { // Process local memory try { - status = commitRequest(transactionId, participantNum); + status = commitRequest(transactionId, participantNum, dropTableRecorded); } catch (UnknownTransactionException u) { if (LOG.isTraceEnabled()) LOG.trace("TrxRegionEndpoint coprocessor: commitRequest - txId " + transactionId + ", Caught UnknownTransactionException after internal commitRequest call - " + u.toString()); ute = u; @@ -5086,11 +5089,17 @@ CoprocessorService, Coprocessor { * @throws IOException */ public int commitRequest(final long transactionId, final int participantNum) throws IOException, UnknownTransactionException { - return commitRequest(transactionId, participantNum, true); + return commitRequest(transactionId, participantNum, true, false); } - public int commitRequest(final long transactionId, final int participantNum, boolean flushHLOG) throws IOException, - UnknownTransactionException { + public int commitRequest(final long transactionId, final int participantNum, final boolean dropTableRecorded) + throws IOException, UnknownTransactionException { + return commitRequest(transactionId, participantNum, true, dropTableRecorded); + } + + public int commitRequest(final long transactionId, final int participantNum, boolean flushHLOG, + boolean dropTableRecorded) throws IOException, + UnknownTransactionException { long txid = 0; String lv_regionName = new String(m_Region.getRegionInfo().getRegionNameAsString()); if (LOG.isDebugEnabled()) LOG.debug("TrxRegionEndpoint coprocessor: commitRequest -- ENTRY txId: " @@ -5170,6 +5179,7 @@ CoprocessorService, Coprocessor { putBySequenceOperations.getAndIncrement(); } // Order is important + state.setDropTableRecorded(dropTableRecorded); state.setStatus(Status.COMMIT_PENDING); state.setCPEpoch(controlPointEpoch.get()); commitPendingTransactions.add(state); @@ -5368,6 +5378,10 @@ CoprocessorService, Coprocessor { return state.hasConflict(); } + public void abortTransaction(final long transactionId) throws IOException, UnknownTransactionException { + abortTransaction(transactionId, false); + } + /** * Abort the transaction. * @@ -5375,8 +5389,7 @@ CoprocessorService, Coprocessor { * @throws IOException * @throws UnknownTransactionException */ - - public void abortTransaction(final long transactionId) throws IOException, UnknownTransactionException { + public void abortTransaction(final long transactionId, final boolean dropTableRecorded) throws IOException, UnknownTransactionException { long txid = 0; if (LOG.isTraceEnabled()) LOG.trace("TrxRegionEndpoint coprocessor: abort transactionId: " + transactionId + " " + m_Region.getRegionInfo().getRegionNameAsString()); @@ -5404,6 +5417,9 @@ CoprocessorService, Coprocessor { state.setStatus(Status.ABORTED); } + if(dropTableRecorded) + state.resetDropTableRecorded(); + if (state.hasWrite()) { // TODO log // this.transactionLog.writeAbortToLog(m_Region.getRegionInfo(), http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/generated/TrxRegionProtos.java ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/generated/TrxRegionProtos.java b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/generated/TrxRegionProtos.java index 564c517..b430768 100755 --- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/generated/TrxRegionProtos.java +++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/generated/TrxRegionProtos.java @@ -61,6 +61,16 @@ public final class TrxRegionProtos { * <code>required int32 participantNum = 3;</code> */ int getParticipantNum(); + + // required bool dropTableRecorded = 4; + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + boolean hasDropTableRecorded(); + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + boolean getDropTableRecorded(); } /** * Protobuf type {@code AbortTransactionRequest} @@ -128,6 +138,11 @@ public final class TrxRegionProtos { participantNum_ = input.readInt32(); break; } + case 32: { + bitField0_ |= 0x00000008; + dropTableRecorded_ = input.readBool(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -216,10 +231,27 @@ public final class TrxRegionProtos { return participantNum_; } + // required bool dropTableRecorded = 4; + public static final int DROPTABLERECORDED_FIELD_NUMBER = 4; + private boolean dropTableRecorded_; + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean hasDropTableRecorded() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean getDropTableRecorded() { + return dropTableRecorded_; + } + private void initFields() { regionName_ = com.google.protobuf.ByteString.EMPTY; transactionId_ = 0L; participantNum_ = 0; + dropTableRecorded_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -238,6 +270,10 @@ public final class TrxRegionProtos { memoizedIsInitialized = 0; return false; } + if (!hasDropTableRecorded()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -254,6 +290,9 @@ public final class TrxRegionProtos { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt32(3, participantNum_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, dropTableRecorded_); + } getUnknownFields().writeTo(output); } @@ -275,6 +314,10 @@ public final class TrxRegionProtos { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, participantNum_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, dropTableRecorded_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -397,6 +440,8 @@ public final class TrxRegionProtos { bitField0_ = (bitField0_ & ~0x00000002); participantNum_ = 0; bitField0_ = (bitField0_ & ~0x00000004); + dropTableRecorded_ = false; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -437,6 +482,10 @@ public final class TrxRegionProtos { to_bitField0_ |= 0x00000004; } result.participantNum_ = participantNum_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.dropTableRecorded_ = dropTableRecorded_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -462,6 +511,9 @@ public final class TrxRegionProtos { if (other.hasParticipantNum()) { setParticipantNum(other.getParticipantNum()); } + if (other.hasDropTableRecorded()) { + setDropTableRecorded(other.getDropTableRecorded()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -479,6 +531,10 @@ public final class TrxRegionProtos { return false; } + if (!hasDropTableRecorded()) { + + return false; + } return true; } @@ -603,6 +659,39 @@ public final class TrxRegionProtos { return this; } + // required bool dropTableRecorded = 4; + private boolean dropTableRecorded_ ; + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean hasDropTableRecorded() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean getDropTableRecorded() { + return dropTableRecorded_; + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public Builder setDropTableRecorded(boolean value) { + bitField0_ |= 0x00000008; + dropTableRecorded_ = value; + onChanged(); + return this; + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public Builder clearDropTableRecorded() { + bitField0_ = (bitField0_ & ~0x00000008); + dropTableRecorded_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:AbortTransactionRequest) } @@ -5993,6 +6082,16 @@ public final class TrxRegionProtos { * <code>required int32 participantNum = 3;</code> */ int getParticipantNum(); + + // required bool dropTableRecorded = 4; + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + boolean hasDropTableRecorded(); + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + boolean getDropTableRecorded(); } /** * Protobuf type {@code CommitRequestRequest} @@ -6060,6 +6159,11 @@ public final class TrxRegionProtos { participantNum_ = input.readInt32(); break; } + case 32: { + bitField0_ |= 0x00000008; + dropTableRecorded_ = input.readBool(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -6148,10 +6252,27 @@ public final class TrxRegionProtos { return participantNum_; } + // required bool dropTableRecorded = 4; + public static final int DROPTABLERECORDED_FIELD_NUMBER = 4; + private boolean dropTableRecorded_; + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean hasDropTableRecorded() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean getDropTableRecorded() { + return dropTableRecorded_; + } + private void initFields() { regionName_ = com.google.protobuf.ByteString.EMPTY; transactionId_ = 0L; participantNum_ = 0; + dropTableRecorded_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -6170,6 +6291,10 @@ public final class TrxRegionProtos { memoizedIsInitialized = 0; return false; } + if (!hasDropTableRecorded()) { + memoizedIsInitialized = 0; + return false; + } memoizedIsInitialized = 1; return true; } @@ -6186,6 +6311,9 @@ public final class TrxRegionProtos { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeInt32(3, participantNum_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBool(4, dropTableRecorded_); + } getUnknownFields().writeTo(output); } @@ -6207,6 +6335,10 @@ public final class TrxRegionProtos { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, participantNum_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, dropTableRecorded_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -6329,6 +6461,8 @@ public final class TrxRegionProtos { bitField0_ = (bitField0_ & ~0x00000002); participantNum_ = 0; bitField0_ = (bitField0_ & ~0x00000004); + dropTableRecorded_ = false; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -6369,6 +6503,10 @@ public final class TrxRegionProtos { to_bitField0_ |= 0x00000004; } result.participantNum_ = participantNum_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.dropTableRecorded_ = dropTableRecorded_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -6394,6 +6532,9 @@ public final class TrxRegionProtos { if (other.hasParticipantNum()) { setParticipantNum(other.getParticipantNum()); } + if (other.hasDropTableRecorded()) { + setDropTableRecorded(other.getDropTableRecorded()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -6411,6 +6552,10 @@ public final class TrxRegionProtos { return false; } + if (!hasDropTableRecorded()) { + + return false; + } return true; } @@ -6535,6 +6680,39 @@ public final class TrxRegionProtos { return this; } + // required bool dropTableRecorded = 4; + private boolean dropTableRecorded_ ; + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean hasDropTableRecorded() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public boolean getDropTableRecorded() { + return dropTableRecorded_; + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public Builder setDropTableRecorded(boolean value) { + bitField0_ |= 0x00000008; + dropTableRecorded_ = value; + onChanged(); + return this; + } + /** + * <code>required bool dropTableRecorded = 4;</code> + */ + public Builder clearDropTableRecorded() { + bitField0_ = (bitField0_ & ~0x00000008); + dropTableRecorded_ = false; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:CommitRequestRequest) } @@ -39583,190 +39761,191 @@ public final class TrxRegionProtos { static { java.lang.String[] descriptorData = { "\n\017TrxRegion.proto\032\013HBase.proto\032\023ClusterS" + - "tatus.proto\032\014Client.proto\"\\\n\027AbortTransa" + + "tatus.proto\032\014Client.proto\"w\n\027AbortTransa" + "ctionRequest\022\022\n\nregionName\030\001 \002(\014\022\025\n\rtran" + - "sactionId\030\002 \002(\003\022\026\n\016participantNum\030\003 \002(\005\"" + - "C\n\030AbortTransactionResponse\022\021\n\texception" + - "\030\001 \001(\t\022\024\n\014hasException\030\002 \001(\010\"d\n\037AbortTra" + - "nsactionMultipleRequest\022\022\n\nregionName\030\001 " + - "\003(\014\022\025\n\rtransactionId\030\002 \002(\003\022\026\n\016participan" + - "tNum\030\003 \002(\005\"K\n AbortTransactionMultipleRe" + - "sponse\022\021\n\texception\030\001 \003(\t\022\024\n\014hasExceptio", - "n\030\002 \001(\010\"D\n\027BeginTransactionRequest\022\025\n\rtr" + - "ansactionId\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\"C\n" + - "\030BeginTransactionResponse\022\021\n\texception\030\001" + - " \001(\t\022\024\n\014hasException\030\002 \001(\010\"}\n\rCommitRequ" + - "est\022\022\n\nregionName\030\001 \002(\014\022\025\n\rtransactionId" + - "\030\002 \002(\003\022\026\n\016participantNum\030\003 \002(\005\022)\n!ignore" + - "UnknownTransactionException\030\004 \001(\010\"9\n\016Com" + - "mitResponse\022\021\n\texception\030\001 \001(\t\022\024\n\014hasExc" + - "eption\030\002 \001(\010\"\205\001\n\025CommitMultipleRequest\022\022" + - "\n\nregionName\030\001 \003(\014\022\025\n\rtransactionId\030\002 \002(", - "\003\022\026\n\016participantNum\030\003 \002(\005\022)\n!ignoreUnkno" + - "wnTransactionException\030\004 \001(\010\"A\n\026CommitMu" + - "ltipleResponse\022\021\n\texception\030\001 \003(\t\022\024\n\014has" + - "Exception\030\002 \001(\010\"Y\n\024CommitRequestRequest\022" + - "\022\n\nregionName\030\001 \002(\014\022\025\n\rtransactionId\030\002 \002" + - "(\003\022\026\n\016participantNum\030\003 \002(\005\"P\n\025CommitRequ" + - "estResponse\022\016\n\006result\030\001 \002(\005\022\021\n\texception" + - "\030\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"a\n\034CommitRe" + - "questMultipleRequest\022\022\n\nregionName\030\001 \003(\014" + - "\022\025\n\rtransactionId\030\002 \002(\003\022\026\n\016participantNu", - "m\030\003 \002(\005\"X\n\035CommitRequestMultipleResponse" + - "\022\016\n\006result\030\001 \003(\005\022\021\n\texception\030\002 \003(\t\022\024\n\014h" + - "asException\030\003 \001(\010\"\\\n\027CommitIfPossibleReq" + + "sactionId\030\002 \002(\003\022\026\n\016participantNum\030\003 \002(\005\022" + + "\031\n\021dropTableRecorded\030\004 \002(\010\"C\n\030AbortTrans" + + "actionResponse\022\021\n\texception\030\001 \001(\t\022\024\n\014has" + + "Exception\030\002 \001(\010\"d\n\037AbortTransactionMulti" + + "pleRequest\022\022\n\nregionName\030\001 \003(\014\022\025\n\rtransa" + + "ctionId\030\002 \002(\003\022\026\n\016participantNum\030\003 \002(\005\"K\n" + + " AbortTransactionMultipleResponse\022\021\n\texc", + "eption\030\001 \003(\t\022\024\n\014hasException\030\002 \001(\010\"D\n\027Be" + + "ginTransactionRequest\022\025\n\rtransactionId\030\001" + + " \002(\003\022\022\n\nregionName\030\002 \002(\014\"C\n\030BeginTransac" + + "tionResponse\022\021\n\texception\030\001 \001(\t\022\024\n\014hasEx" + + "ception\030\002 \001(\010\"}\n\rCommitRequest\022\022\n\nregion" + + "Name\030\001 \002(\014\022\025\n\rtransactionId\030\002 \002(\003\022\026\n\016par" + + "ticipantNum\030\003 \002(\005\022)\n!ignoreUnknownTransa" + + "ctionException\030\004 \001(\010\"9\n\016CommitResponse\022\021" + + "\n\texception\030\001 \001(\t\022\024\n\014hasException\030\002 \001(\010\"" + + "\205\001\n\025CommitMultipleRequest\022\022\n\nregionName\030", + "\001 \003(\014\022\025\n\rtransactionId\030\002 \002(\003\022\026\n\016particip" + + "antNum\030\003 \002(\005\022)\n!ignoreUnknownTransaction" + + "Exception\030\004 \001(\010\"A\n\026CommitMultipleRespons" + + "e\022\021\n\texception\030\001 \003(\t\022\024\n\014hasException\030\002 \001" + + "(\010\"t\n\024CommitRequestRequest\022\022\n\nregionName" + + "\030\001 \002(\014\022\025\n\rtransactionId\030\002 \002(\003\022\026\n\016partici" + + "pantNum\030\003 \002(\005\022\031\n\021dropTableRecorded\030\004 \002(\010" + + "\"P\n\025CommitRequestResponse\022\016\n\006result\030\001 \002(" + + "\005\022\021\n\texception\030\002 \001(\t\022\024\n\014hasException\030\003 \001" + + "(\010\"a\n\034CommitRequestMultipleRequest\022\022\n\nre", + "gionName\030\001 \003(\014\022\025\n\rtransactionId\030\002 \002(\003\022\026\n" + + "\016participantNum\030\003 \002(\005\"X\n\035CommitRequestMu" + + "ltipleResponse\022\016\n\006result\030\001 \003(\005\022\021\n\texcept" + + "ion\030\002 \003(\t\022\024\n\014hasException\030\003 \001(\010\"\\\n\027Commi" + + "tIfPossibleRequest\022\022\n\nregionName\030\001 \002(\014\022\025" + + "\n\rtransactionId\030\002 \002(\003\022\026\n\016participantNum\030" + + "\003 \002(\005\"C\n\030CommitIfPossibleResponse\022\021\n\texc" + + "eption\030\001 \001(\t\022\024\n\014hasException\030\002 \001(\010\"\241\001\n\025C" + + "heckAndDeleteRequest\022\025\n\rtransactionId\030\001 " + + "\002(\003\022\022\n\nregionName\030\002 \002(\014\022\013\n\003row\030\003 \002(\014\022\016\n\006", + "family\030\004 \002(\014\022\021\n\tqualifier\030\005 \002(\014\022\r\n\005value" + + "\030\006 \002(\014\022\036\n\006delete\030\007 \002(\0132\016.MutationProto\"Q" + + "\n\026CheckAndDeleteResponse\022\016\n\006result\030\001 \002(\010" + + "\022\021\n\texception\030\002 \001(\t\022\024\n\014hasException\030\003 \001(" + + "\010\"\233\001\n\022CheckAndPutRequest\022\025\n\rtransactionI" + + "d\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\013\n\003row\030\003 \002(\014" + + "\022\016\n\006family\030\004 \002(\014\022\021\n\tqualifier\030\005 \002(\014\022\r\n\005v" + + "alue\030\006 \002(\014\022\033\n\003put\030\007 \002(\0132\016.MutationProto\"" + + "N\n\023CheckAndPutResponse\022\016\n\006result\030\001 \002(\010\022\021" + + "\n\texception\030\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"", + "S\n\023CloseScannerRequest\022\025\n\rtransactionId\030" + + "\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\021\n\tscannerId\030\003" + + " \002(\003\"?\n\024CloseScannerResponse\022\021\n\texceptio" + + "n\030\001 \001(\t\022\024\n\014hasException\030\002 \001(\010\"o\n\"DeleteM" + + "ultipleTransactionalRequest\022\025\n\rtransacti" + + "onId\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\036\n\006delete" + + "\030\003 \003(\0132\016.MutationProto\"g\n#DeleteMultiple" + + "TransactionalResponse\022\027\n\006result\030\001 \001(\0132\007." + + "Result\022\021\n\texception\030\002 \001(\t\022\024\n\014hasExceptio" + + "n\030\003 \001(\010\"g\n\032DeleteTransactionalRequest\022\025\n", + "\rtransactionId\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014" + + "\022\036\n\006delete\030\003 \002(\0132\016.MutationProto\"_\n\033Dele" + + "teTransactionalResponse\022\027\n\006result\030\001 \001(\0132" + + "\007.Result\022\021\n\texception\030\002 \001(\t\022\024\n\014hasExcept" + + "ion\030\003 \001(\010\"W\n\027GetTransactionalRequest\022\025\n\r" + + "transactionId\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022" + + "\021\n\003get\030\003 \002(\0132\004.Get\"\\\n\030GetTransactionalRe" + + "sponse\022\027\n\006result\030\001 \001(\0132\007.Result\022\021\n\texcep" + + "tion\030\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"T\n\022Open" + + "ScannerRequest\022\025\n\rtransactionId\030\001 \002(\003\022\022\n", + "\nregionName\030\002 \002(\014\022\023\n\004scan\030\003 \002(\0132\005.Scan\"Q" + + "\n\023OpenScannerResponse\022\021\n\tscannerId\030\001 \002(\003" + + "\022\021\n\texception\030\002 \001(\t\022\024\n\014hasException\030\003 \001(" + + "\010\"\223\001\n\022PerformScanRequest\022\025\n\rtransactionI" + + "d\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\021\n\tscannerId" + + "\030\003 \002(\003\022\024\n\014numberOfRows\030\004 \002(\005\022\024\n\014closeSca" + + "nner\030\005 \002(\010\022\023\n\013nextCallSeq\030\006 \002(\003\"\214\001\n\023Perf" + + "ormScanResponse\022\027\n\006result\030\001 \003(\0132\007.Result" + + "\022\r\n\005count\030\002 \002(\003\022\023\n\013nextCallSeq\030\003 \002(\003\022\017\n\007" + + "hasMore\030\004 \002(\010\022\021\n\texception\030\005 \001(\t\022\024\n\014hasE", + "xception\030\006 \001(\010\"a\n\027PutTransactionalReques" + + "t\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nregionName\030\002" + + " \002(\014\022\033\n\003put\030\003 \002(\0132\016.MutationProto\"\\\n\030Put" + + "TransactionalResponse\022\027\n\006result\030\001 \001(\0132\007." + + "Result\022\021\n\texception\030\002 \001(\t\022\024\n\014hasExceptio" + + "n\030\003 \001(\010\"i\n\037PutMultipleTransactionalReque" + + "st\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nregionName\030" + + "\002 \002(\014\022\033\n\003put\030\003 \003(\0132\016.MutationProto\"d\n Pu" + + "tMultipleTransactionalResponse\022\027\n\006result" + + "\030\001 \001(\0132\007.Result\022\021\n\texception\030\002 \001(\t\022\024\n\014ha", + "sException\030\003 \001(\010\"Q\n\026RecoveryRequestReque" + + "st\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nregionName\030" + + "\002 \002(\014\022\014\n\004tmId\030\003 \002(\005\"R\n\027RecoveryRequestRe" + + "sponse\022\016\n\006result\030\001 \003(\003\022\021\n\texception\030\002 \001(" + + "\t\022\024\n\014hasException\030\003 \001(\010\"~\n\021TlogDeleteReq" + "uest\022\022\n\nregionName\030\001 \002(\014\022\025\n\rtransactionI" + - "d\030\002 \002(\003\022\026\n\016participantNum\030\003 \002(\005\"C\n\030Commi" + - "tIfPossibleResponse\022\021\n\texception\030\001 \001(\t\022\024" + - "\n\014hasException\030\002 \001(\010\"\241\001\n\025CheckAndDeleteR" + - "equest\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nregionN" + - "ame\030\002 \002(\014\022\013\n\003row\030\003 \002(\014\022\016\n\006family\030\004 \002(\014\022\021" + - "\n\tqualifier\030\005 \002(\014\022\r\n\005value\030\006 \002(\014\022\036\n\006dele", - "te\030\007 \002(\0132\016.MutationProto\"Q\n\026CheckAndDele" + - "teResponse\022\016\n\006result\030\001 \002(\010\022\021\n\texception\030" + - "\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"\233\001\n\022CheckAnd" + - "PutRequest\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nreg" + - "ionName\030\002 \002(\014\022\013\n\003row\030\003 \002(\014\022\016\n\006family\030\004 \002" + - "(\014\022\021\n\tqualifier\030\005 \002(\014\022\r\n\005value\030\006 \002(\014\022\033\n\003" + - "put\030\007 \002(\0132\016.MutationProto\"N\n\023CheckAndPut" + - "Response\022\016\n\006result\030\001 \002(\010\022\021\n\texception\030\002 " + - "\001(\t\022\024\n\014hasException\030\003 \001(\010\"S\n\023CloseScanne" + - "rRequest\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nregio", - "nName\030\002 \002(\014\022\021\n\tscannerId\030\003 \002(\003\"?\n\024CloseS" + - "cannerResponse\022\021\n\texception\030\001 \001(\t\022\024\n\014has" + - "Exception\030\002 \001(\010\"o\n\"DeleteMultipleTransac" + - "tionalRequest\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\n" + - "regionName\030\002 \002(\014\022\036\n\006delete\030\003 \003(\0132\016.Mutat" + - "ionProto\"g\n#DeleteMultipleTransactionalR" + - "esponse\022\027\n\006result\030\001 \001(\0132\007.Result\022\021\n\texce" + - "ption\030\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"g\n\032Del" + - "eteTransactionalRequest\022\025\n\rtransactionId" + - "\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\036\n\006delete\030\003 \002", - "(\0132\016.MutationProto\"_\n\033DeleteTransactiona" + - "lResponse\022\027\n\006result\030\001 \001(\0132\007.Result\022\021\n\tex" + - "ception\030\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"W\n\027G" + - "etTransactionalRequest\022\025\n\rtransactionId\030" + - "\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\021\n\003get\030\003 \002(\0132\004" + - ".Get\"\\\n\030GetTransactionalResponse\022\027\n\006resu" + - "lt\030\001 \001(\0132\007.Result\022\021\n\texception\030\002 \001(\t\022\024\n\014" + - "hasException\030\003 \001(\010\"T\n\022OpenScannerRequest" + - "\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nregionName\030\002 " + - "\002(\014\022\023\n\004scan\030\003 \002(\0132\005.Scan\"Q\n\023OpenScannerR", - "esponse\022\021\n\tscannerId\030\001 \002(\003\022\021\n\texception\030" + - "\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"\223\001\n\022PerformS" + - "canRequest\022\025\n\rtransactionId\030\001 \002(\003\022\022\n\nreg" + - "ionName\030\002 \002(\014\022\021\n\tscannerId\030\003 \002(\003\022\024\n\014numb" + - "erOfRows\030\004 \002(\005\022\024\n\014closeScanner\030\005 \002(\010\022\023\n\013" + - "nextCallSeq\030\006 \002(\003\"\214\001\n\023PerformScanRespons" + - "e\022\027\n\006result\030\001 \003(\0132\007.Result\022\r\n\005count\030\002 \002(" + - "\003\022\023\n\013nextCallSeq\030\003 \002(\003\022\017\n\007hasMore\030\004 \002(\010\022" + - "\021\n\texception\030\005 \001(\t\022\024\n\014hasException\030\006 \001(\010" + - "\"a\n\027PutTransactionalRequest\022\025\n\rtransacti", - "onId\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\033\n\003put\030\003 " + - "\002(\0132\016.MutationProto\"\\\n\030PutTransactionalR" + - "esponse\022\027\n\006result\030\001 \001(\0132\007.Result\022\021\n\texce" + - "ption\030\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"i\n\037Put" + - "MultipleTransactionalRequest\022\025\n\rtransact" + - "ionId\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\033\n\003put\030\003" + - " \003(\0132\016.MutationProto\"d\n PutMultipleTrans" + - "actionalResponse\022\027\n\006result\030\001 \001(\0132\007.Resul" + - "t\022\021\n\texception\030\002 \001(\t\022\024\n\014hasException\030\003 \001" + - "(\010\"Q\n\026RecoveryRequestRequest\022\025\n\rtransact", - "ionId\030\001 \002(\003\022\022\n\nregionName\030\002 \002(\014\022\014\n\004tmId\030" + - "\003 \002(\005\"R\n\027RecoveryRequestResponse\022\016\n\006resu" + - "lt\030\001 \003(\003\022\021\n\texception\030\002 \001(\t\022\024\n\014hasExcept" + - "ion\030\003 \001(\010\"~\n\021TlogDeleteRequest\022\022\n\nregion" + - "Name\030\001 \002(\014\022\025\n\rtransactionId\030\002 \002(\003\022\023\n\004sca" + - "n\030\003 \002(\0132\005.Scan\022\023\n\013auditSeqNum\030\004 \002(\003\022\024\n\014a" + - "geCommitted\030\005 \002(\010\"e\n\022TlogDeleteResponse\022" + - "\027\n\006result\030\001 \003(\0132\007.Result\022\r\n\005count\030\002 \002(\003\022" + - "\021\n\texception\030\003 \001(\t\022\024\n\014hasException\030\004 \001(\010" + - "\"\273\001\n\020TlogWriteRequest\022\022\n\nregionName\030\001 \002(", - "\014\022\025\n\rtransactionId\030\002 \002(\003\022\033\n\003put\030\003 \002(\0132\016." + - "MutationProto\022\013\n\003row\030\004 \002(\014\022\016\n\006family\030\005 \002" + - "(\014\022\021\n\tqualifier\030\006 \002(\014\022\r\n\005value\030\007 \002(\014\022\020\n\010" + - "commitId\030\010 \002(\003\022\016\n\006forced\030\t \001(\010\"L\n\021TlogWr" + - "iteResponse\022\016\n\006result\030\001 \003(\003\022\021\n\texception" + - "\030\002 \001(\t\022\024\n\014hasException\030\003 \001(\010\"\321\001\n(TlogTra" + - "nsactionStatesFromIntervalRequest\022\022\n\nreg" + - "ionName\030\001 \002(\014\022\025\n\rtransactionId\030\002 \002(\003\022\021\n\t" + - "clusterId\030\003 \002(\003\022\023\n\013auditSeqNum\030\004 \002(\003\022\021\n\t" + - "scannerId\030\005 \002(\003\022\024\n\014numberOfRows\030\006 \002(\005\022\023\n", - "\013nextCallSeq\030\007 \002(\003\022\024\n\014closeScanner\030\010 \002(\010" + - "\"\242\001\n)TlogTransactionStatesFromIntervalRe" + - "sponse\022\027\n\006result\030\001 \003(\0132\007.Result\022\r\n\005count" + - "\030\002 \002(\003\022\023\n\013nextCallSeq\030\003 \002(\003\022\017\n\007hasMore\030\004" + - " \002(\010\022\021\n\texception\030\005 \001(\t\022\024\n\014hasException\030" + - "\006 \001(\010\"\243\001\n\035TransactionalAggregateRequest\022" + - "\022\n\nregionName\030\001 \002(\014\022\025\n\rtransactionId\030\002 \002" + - "(\003\022\036\n\026interpreter_class_name\030\003 \002(\t\022\023\n\004sc" + - "an\030\004 \002(\0132\005.Scan\022\"\n\032interpreter_specific_" + - "bytes\030\005 \001(\014\"I\n\036TransactionalAggregateRes", - "ponse\022\022\n\nfirst_part\030\003 \003(\014\022\023\n\013second_part" + - "\030\004 \001(\014\"c\n\022TransactionPersist\022\016\n\006txById\030\001" + - " \003(\003\022\024\n\014seqNoListSeq\030\002 \003(\003\022\024\n\014seqNoListT" + - "xn\030\003 \003(\003\022\021\n\tnextSeqId\030\004 \002(\003\"\372\001\n\023Transact" + - "ionStateMsg\022\014\n\004txId\030\001 \002(\003\022\033\n\003put\030\002 \003(\0132\016" + - ".MutationProto\022\036\n\006delete\030\003 \003(\0132\016.Mutatio" + - "nProto\022\020\n\010putOrDel\030\004 \003(\010\022\023\n\013txnsToCheck\030" + - "\005 \003(\003\022\023\n\013startSeqNum\030\006 \002(\003\022\016\n\006seqNum\030\007 \002" + - "(\003\022\020\n\010logSeqId\030\010 \002(\003\022\022\n\nreinstated\030\t \002(\010" + - "\022\016\n\006status\030\n \002(\005\022\026\n\016commitProgress\030\013 \002(\005", - "2\262\020\n\020TrxRegionService\022G\n\020abortTransactio" + - "n\022\030.AbortTransactionRequest\032\031.AbortTrans" + - "actionResponse\022_\n\030abortTransactionMultip" + - "le\022 .AbortTransactionMultipleRequest\032!.A" + - "bortTransactionMultipleResponse\022G\n\020begin" + - "Transaction\022\030.BeginTransactionRequest\032\031." + - "BeginTransactionResponse\022A\n\016checkAndDele" + - "te\022\026.CheckAndDeleteRequest\032\027.CheckAndDel" + - "eteResponse\0228\n\013checkAndPut\022\023.CheckAndPut" + - "Request\032\024.CheckAndPutResponse\022;\n\014closeSc", - "anner\022\024.CloseScannerRequest\032\025.CloseScann" + - "erResponse\022)\n\006commit\022\016.CommitRequest\032\017.C" + - "ommitResponse\022G\n\020commitIfPossible\022\030.Comm" + - "itIfPossibleRequest\032\031.CommitIfPossibleRe" + - "sponse\022V\n\025commitRequestMultiple\022\035.Commit" + - "RequestMultipleRequest\032\036.CommitRequestMu" + - "ltipleResponse\022A\n\016commitMultiple\022\026.Commi" + - "tMultipleRequest\032\027.CommitMultipleRespons" + - "e\022>\n\rcommitRequest\022\025.CommitRequestReques" + - "t\032\026.CommitRequestResponse\022C\n\006delete\022\033.De", - "leteTransactionalRequest\032\034.DeleteTransac" + - "tionalResponse\022[\n\016deleteMultiple\022#.Delet" + - "eMultipleTransactionalRequest\032$.DeleteMu" + - "ltipleTransactionalResponse\022:\n\003get\022\030.Get" + - "TransactionalRequest\032\031.GetTransactionalR" + - "esponse\0228\n\013performScan\022\023.PerformScanRequ" + - "est\032\024.PerformScanResponse\0228\n\013openScanner" + - "\022\023.OpenScannerRequest\032\024.OpenScannerRespo" + - "nse\022:\n\003put\022\030.PutTransactionalRequest\032\031.P" + - "utTransactionalResponse\022R\n\013putMultiple\022 ", - ".PutMultipleTransactionalRequest\032!.PutMu" + - "ltipleTransactionalResponse\022D\n\017recoveryR" + - "equest\022\027.RecoveryRequestRequest\032\030.Recove" + - "ryRequestResponse\022<\n\021deleteTlogEntries\022\022" + - ".TlogDeleteRequest\032\023.TlogDeleteResponse\022" + - "0\n\007putTlog\022\021.TlogWriteRequest\032\022.TlogWrit" + - "eResponse\022w\n\036getTransactionStatesPriorTo" + - "Asn\022).TlogTransactionStatesFromIntervalR" + - "equest\032*.TlogTransactionStatesFromInterv" + - "alResponse\022I\n\006GetMax\022\036.TransactionalAggr", - "egateRequest\032\037.TransactionalAggregateRes" + - "ponse\022I\n\006GetMin\022\036.TransactionalAggregate" + - "Request\032\037.TransactionalAggregateResponse" + - "\022I\n\006GetSum\022\036.TransactionalAggregateReque" + - "st\032\037.TransactionalAggregateResponse\022L\n\tG" + - "etRowNum\022\036.TransactionalAggregateRequest" + - "\032\037.TransactionalAggregateResponse\022I\n\006Get" + - "Avg\022\036.TransactionalAggregateRequest\032\037.Tr" + - "ansactionalAggregateResponse\022I\n\006GetStd\022\036" + - ".TransactionalAggregateRequest\032\037.Transac", - "tionalAggregateResponse\022L\n\tGetMedian\022\036.T" + - "ransactionalAggregateRequest\032\037.Transacti" + - "onalAggregateResponseBS\n;org.apache.hado" + - "op.hbase.coprocessor.transactional.gener" + - "atedB\017TrxRegionProtosH\001\210\001\001" + "d\030\002 \002(\003\022\023\n\004scan\030\003 \002(\0132\005.Scan\022\023\n\013auditSeq" + + "Num\030\004 \002(\003\022\024\n\014ageCommitted\030\005 \002(\010\"e\n\022TlogD" + + "eleteResponse\022\027\n\006result\030\001 \003(\0132\007.Result\022\r" + + "\n\005count\030\002 \002(\003\022\021\n\texception\030\003 \001(\t\022\024\n\014hasE", + "xception\030\004 \001(\010\"\273\001\n\020TlogWriteRequest\022\022\n\nr" + + "egionName\030\001 \002(\014\022\025\n\rtransactionId\030\002 \002(\003\022\033" + + "\n\003put\030\003 \002(\0132\016.MutationProto\022\013\n\003row\030\004 \002(\014" + + "\022\016\n\006family\030\005 \002(\014\022\021\n\tqualifier\030\006 \002(\014\022\r\n\005v" + + "alue\030\007 \002(\014\022\020\n\010commitId\030\010 \002(\003\022\016\n\006forced\030\t" + + " \001(\010\"L\n\021TlogWriteResponse\022\016\n\006result\030\001 \003(" + + "\003\022\021\n\texception\030\002 \001(\t\022\024\n\014hasException\030\003 \001" + + "(\010\"\321\001\n(TlogTransactionStatesFromInterval" + + "Request\022\022\n\nregionName\030\001 \002(\014\022\025\n\rtransacti" + + "onId\030\002 \002(\003\022\021\n\tclusterId\030\003 \002(\003\022\023\n\013auditSe", + "qNum\030\004 \002(\003\022\021\n\tscannerId\030\005 \002(\003\022\024\n\014numberO" + + "fRows\030\006 \002(\005\022\023\n\013nextCallSeq\030\007 \002(\003\022\024\n\014clos" + + "eScanner\030\010 \002(\010\"\242\001\n)TlogTransactionStates" + + "FromIntervalResponse\022\027\n\006result\030\001 \003(\0132\007.R" + + "esult\022\r\n\005count\030\002 \002(\003\022\023\n\013nextCallSeq\030\003 \002(" + + "\003\022\017\n\007hasMore\030\004 \002(\010\022\021\n\texception\030\005 \001(\t\022\024\n" + + "\014hasException\030\006 \001(\010\"\243\001\n\035TransactionalAgg" + + "regateRequest\022\022\n\nregionName\030\001 \002(\014\022\025\n\rtra" + + "nsactionId\030\002 \002(\003\022\036\n\026interpreter_class_na" + + "me\030\003 \002(\t\022\023\n\004scan\030\004 \002(\0132\005.Scan\022\"\n\032interpr", + "eter_specific_bytes\030\005 \001(\014\"I\n\036Transaction" + + "alAggregateResponse\022\022\n\nfirst_part\030\003 \003(\014\022" + + "\023\n\013second_part\030\004 \001(\014\"c\n\022TransactionPersi" + + "st\022\016\n\006txById\030\001 \003(\003\022\024\n\014seqNoListSeq\030\002 \003(\003" + + "\022\024\n\014seqNoListTxn\030\003 \003(\003\022\021\n\tnextSeqId\030\004 \002(" + + "\003\"\372\001\n\023TransactionStateMsg\022\014\n\004txId\030\001 \002(\003\022" + + "\033\n\003put\030\002 \003(\0132\016.MutationProto\022\036\n\006delete\030\003" + + " \003(\0132\016.MutationProto\022\020\n\010putOrDel\030\004 \003(\010\022\023" + + "\n\013txnsToCheck\030\005 \003(\003\022\023\n\013startSeqNum\030\006 \002(\003" + + "\022\016\n\006seqNum\030\007 \002(\003\022\020\n\010logSeqId\030\010 \002(\003\022\022\n\nre", + "instated\030\t \002(\010\022\016\n\006status\030\n \002(\005\022\026\n\016commit" + + "Progress\030\013 \002(\0052\262\020\n\020TrxRegionService\022G\n\020a" + + "bortTransaction\022\030.AbortTransactionReques" + + "t\032\031.AbortTransactionResponse\022_\n\030abortTra" + + "nsactionMultiple\022 .AbortTransactionMulti" + + "pleRequest\032!.AbortTransactionMultipleRes" + + "ponse\022G\n\020beginTransaction\022\030.BeginTransac" + + "tionRequest\032\031.BeginTransactionResponse\022A" + + "\n\016checkAndDelete\022\026.CheckAndDeleteRequest" + + "\032\027.CheckAndDeleteResponse\0228\n\013checkAndPut", + "\022\023.CheckAndPutRequest\032\024.CheckAndPutRespo" + + "nse\022;\n\014closeScanner\022\024.CloseScannerReques" + + "t\032\025.CloseScannerResponse\022)\n\006commit\022\016.Com" + + "mitRequest\032\017.CommitResponse\022G\n\020commitIfP" + + "ossible\022\030.CommitIfPossibleRequest\032\031.Comm" + + "itIfPossibleResponse\022V\n\025commitRequestMul" + + "tiple\022\035.CommitRequestMultipleRequest\032\036.C" + + "ommitRequestMultipleResponse\022A\n\016commitMu" + + "ltiple\022\026.CommitMultipleRequest\032\027.CommitM" + + "ultipleResponse\022>\n\rcommitRequest\022\025.Commi", + "tRequestRequest\032\026.CommitRequestResponse\022" + + "C\n\006delete\022\033.DeleteTransactionalRequest\032\034" + + ".DeleteTransactionalResponse\022[\n\016deleteMu" + + "ltiple\022#.DeleteMultipleTransactionalRequ" + + "est\032$.DeleteMultipleTransactionalRespons" + + "e\022:\n\003get\022\030.GetTransactionalRequest\032\031.Get" + + "TransactionalResponse\0228\n\013performScan\022\023.P" + + "erformScanRequest\032\024.PerformScanResponse\022" + + "8\n\013openScanner\022\023.OpenScannerRequest\032\024.Op" + + "enScannerResponse\022:\n\003put\022\030.PutTransactio", + "nalRequest\032\031.PutTransactionalResponse\022R\n" + + "\013putMultiple\022 .PutMultipleTransactionalR" + + "equest\032!.PutMultipleTransactionalRespons" + + "e\022D\n\017recoveryRequest\022\027.RecoveryRequestRe" + + "quest\032\030.RecoveryRequestResponse\022<\n\021delet" + + "eTlogEntries\022\022.TlogDeleteRequest\032\023.TlogD" + + "eleteResponse\0220\n\007putTlog\022\021.TlogWriteRequ" + + "est\032\022.TlogWriteResponse\022w\n\036getTransactio" + + "nStatesPriorToAsn\022).TlogTransactionState" + + "sFromIntervalRequest\032*.TlogTransactionSt", + "atesFromIntervalResponse\022I\n\006GetMax\022\036.Tra" + + "nsactionalAggregateRequest\032\037.Transaction" + + "alAggregateResponse\022I\n\006GetMin\022\036.Transact" + + "ionalAggregateRequest\032\037.TransactionalAgg" + + "regateResponse\022I\n\006GetSum\022\036.Transactional" + + "AggregateRequest\032\037.TransactionalAggregat" + + "eResponse\022L\n\tGetRowNum\022\036.TransactionalAg" + + "gregateRequest\032\037.TransactionalAggregateR" + + "esponse\022I\n\006GetAvg\022\036.TransactionalAggrega" + + "teRequest\032\037.TransactionalAggregateRespon", + "se\022I\n\006GetStd\022\036.TransactionalAggregateReq" + + "uest\032\037.TransactionalAggregateResponse\022L\n" + + "\tGetMedian\022\036.TransactionalAggregateReque" + + "st\032\037.TransactionalAggregateResponseBS\n;o" + + "rg.apache.hadoop.hbase.coprocessor.trans" + + "actional.generatedB\017TrxRegionProtosH\001\210\001\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -39778,7 +39957,7 @@ public final class TrxRegionProtos { internal_static_AbortTransactionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_AbortTransactionRequest_descriptor, - new java.lang.String[] { "RegionName", "TransactionId", "ParticipantNum", }); + new java.lang.String[] { "RegionName", "TransactionId", "ParticipantNum", "DropTableRecorded", }); internal_static_AbortTransactionResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_AbortTransactionResponse_fieldAccessorTable = new @@ -39838,7 +40017,7 @@ public final class TrxRegionProtos { internal_static_CommitRequestRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_CommitRequestRequest_descriptor, - new java.lang.String[] { "RegionName", "TransactionId", "ParticipantNum", }); + new java.lang.String[] { "RegionName", "TransactionId", "ParticipantNum", "DropTableRecorded", }); internal_static_CommitRequestResponse_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_CommitRequestResponse_fieldAccessorTable = new http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl index 6994745..0eac088 100644 --- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl +++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/regionserver/transactional/TrxTransactionState.java.tmpl @@ -151,11 +151,27 @@ public class TrxTransactionState extends TransactionState { private List<WriteAction> writeOrdering = Collections.synchronizedList(new LinkedList<WriteAction>()); private Set<TrxTransactionState> transactionsToCheck = Collections.synchronizedSet(new HashSet<TrxTransactionState>()); private WALEdit e; + private boolean dropTableRecorded; public TrxTransactionState(final long transactionId, final long rLogStartSequenceId, AtomicLong hlogSeqId, final HRegionInfo regionInfo, HTableDescriptor htd, WAL hLog, boolean logging) { super(transactionId, rLogStartSequenceId, hlogSeqId, regionInfo, htd, hLog, logging); this.e = new WALEdit(); + dropTableRecorded = false; + } + + public void setDropTableRecorded(boolean dropTableRecord) { + if (LOG.isTraceEnabled()) LOG.trace("setDropTableRecorded:" + dropTableRecord + " Region " + regionInfo.getRegionNameAsString()); + dropTableRecorded = dropTableRecord; + } + + public void resetDropTableRecorded() { + if (LOG.isTraceEnabled()) LOG.trace("resetDropTableRecorded, Region :" + regionInfo.getRegionNameAsString()); + dropTableRecorded = false; + } + + public boolean dropTableRecorded() { + return dropTableRecorded; } public synchronized void addRead(final byte[] rowKey) { @@ -330,6 +346,7 @@ public class TrxTransactionState extends TransactionState { clearDeletes(); clearTags(); clearWALEdit(); + dropTableRecorded = false; } public void clearTransactionsToCheck() { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto b/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto index bf5656f..ecfe69b 100755 --- a/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto +++ b/core/sqf/src/seatrans/hbase-trx/src/main/protobuf/TrxRegion.proto @@ -36,6 +36,7 @@ message AbortTransactionRequest{ required bytes regionName = 1; required int64 transactionId = 2; required int32 participantNum = 3; + required bool dropTableRecorded = 4; } message AbortTransactionResponse { @@ -92,6 +93,7 @@ message CommitRequestRequest{ required bytes regionName = 1; required int64 transactionId = 2; required int32 participantNum = 3; + required bool dropTableRecorded = 4; } message CommitRequestResponse { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sql/cli/SessionDefaults.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/SessionDefaults.cpp b/core/sql/cli/SessionDefaults.cpp index bc5bd13..2306e29 100644 --- a/core/sql/cli/SessionDefaults.cpp +++ b/core/sql/cli/SessionDefaults.cpp @@ -840,6 +840,8 @@ static const AQRInfo::AQRErrorMap aqrErrorMap[] = // view not found AQREntry( 8598, 0, 1, 0, 1, 0, "", 0, 0), + AQREntry( 8606, 73, 3, 60, 0, 0, "", 0, 0), + AQREntry( 8606, 97, 1, 0, 5, 0, "", 0, 0), // privileges may have been revoked http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sql/regress/core/DIFF116.KNOWN.SB ---------------------------------------------------------------------- diff --git a/core/sql/regress/core/DIFF116.KNOWN.SB b/core/sql/regress/core/DIFF116.KNOWN.SB index 7db919b..e69de29 100644 --- a/core/sql/regress/core/DIFF116.KNOWN.SB +++ b/core/sql/regress/core/DIFF116.KNOWN.SB @@ -1,21 +0,0 @@ -467c467,469 -< --- SQL operation complete. ---- -> *** ERROR[8606] Transaction subsystem TMF returned error 73 on a commit transaction. -> -> --- SQL operation failed with errors. -470,471c472 -< -- Definition of table #CAT.#SCH.T116T1 -< -- Definition current ---- -> *** ERROR[4254] Object #CAT.#SCH.T116T1 has invalid state and cannot be accessed. Use cleanup command to drop it. -473,475c474 -< ( -< A INT NO DEFAULT NOT NULL NOT DROPPABLE -< ) ---- -> *** ERROR[4082] Object #CAT.#SCH.T116T1 does not exist or is inaccessible. -477c476 -< --- SQL operation complete. ---- -> --- SQL operation failed with errors. http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1af3985b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp index 921369f..b01b580 100644 --- a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp +++ b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp @@ -445,6 +445,7 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) int32_t rowCount = 0; bool someObjectsCouldNotBeDropped = false; Queue * objectsQueue = NULL; + Queue * otherObjectsQueue = NULL; NABoolean dirtiedMetadata = FALSE; @@ -539,6 +540,7 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) } } +#ifdef __ignore // Drop histogram tables first objectsQueue->position(); for (size_t i = 0; i < objectsQueue->numEntries(); i++) @@ -555,6 +557,7 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) someObjectsCouldNotBeDropped = true; } } +#endif // Drop procedures (SPJs), UDFs (functions), and views objectsQueue->position(); @@ -723,19 +726,17 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) getSystemCatalog(),SEABASE_MD_SCHEMA,SEABASE_OBJECTS, (char*)catName.data(),(char*)schName.data(), COM_INDEX_OBJECT_LIT); - - cliRC = cliInterface.fetchAllRows(objectsQueue,query,0,FALSE,FALSE,TRUE); + cliRC = cliInterface.fetchAllRows(otherObjectsQueue,query,0,FALSE,FALSE,TRUE); if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); goto label_error; } - objectsQueue->position(); - for (int idx = 0; idx < objectsQueue->numEntries(); idx++) + otherObjectsQueue->position(); + for (int idx = 0; idx < otherObjectsQueue->numEntries(); idx++) { - OutputInfo * vi = (OutputInfo*)objectsQueue->getNext(); - + OutputInfo * vi = (OutputInfo*)otherObjectsQueue->getNext(); char * objName = vi->get(0); NAString objType = vi->get(1); @@ -765,18 +766,17 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) (char*)catName.data(),(char*)schName.data(), COM_SEQUENCE_GENERATOR_OBJECT_LIT); - cliRC = cliInterface.fetchAllRows(objectsQueue,query,0,FALSE,FALSE,TRUE); + cliRC = cliInterface.fetchAllRows(otherObjectsQueue,query,0,FALSE,FALSE,TRUE); if (cliRC < 0) { cliInterface.retrieveSQLDiagnostics(CmpCommon::diags()); goto label_error; } - objectsQueue->position(); - for (int idx = 0; idx < objectsQueue->numEntries(); idx++) + otherObjectsQueue->position(); + for (int idx = 0; idx < otherObjectsQueue->numEntries(); idx++) { - OutputInfo * vi = (OutputInfo*)objectsQueue->getNext(); - + OutputInfo * vi = (OutputInfo*)otherObjectsQueue->getNext(); char * objName = vi->get(0); NAString objType = vi->get(1); @@ -794,6 +794,23 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode) } } + // Drop histogram tables last + objectsQueue->position(); + for (size_t i = 0; i < objectsQueue->numEntries(); i++) + { + OutputInfo * vi = (OutputInfo*)objectsQueue->getNext(); + NAString objName = vi->get(0); + + if (isHistogramTable(objName)) + { + dirtiedMetadata = TRUE; + if (dropOneTable(cliInterface,(char*)catName.data(), + (char*)schName.data(),(char*)objName.data(), + isVolatile, dropSchemaNode->ddlXns())) + someObjectsCouldNotBeDropped = true; + } + } + // For volatile schemas, sometimes only the objects get dropped. // If the dropObjectsOnly flag is set, just exit now, we are done. if (dropSchemaNode->dropObjectsOnly())
