[log](tablet invert) add preconditition check failed log (#26770)
This commit is contained in:
@ -142,7 +142,8 @@ public class TabletInvertedIndex {
|
||||
// traverse replicas in meta with this backend
|
||||
replicaMetaWithBackend.entrySet().parallelStream().forEach(entry -> {
|
||||
long tabletId = entry.getKey();
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId));
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId),
|
||||
"tablet " + tabletId + " not exists, backend " + backendId);
|
||||
TabletMeta tabletMeta = tabletMetaMap.get(tabletId);
|
||||
|
||||
if (backendTablets.containsKey(tabletId)) {
|
||||
@ -571,7 +572,9 @@ public class TabletInvertedIndex {
|
||||
public void addReplica(long tabletId, Replica replica) {
|
||||
long stamp = writeLock();
|
||||
try {
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId));
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId),
|
||||
"tablet " + tabletId + " not exists, replica " + replica.getId()
|
||||
+ ", backend " + replica.getBackendId());
|
||||
replicaMetaTable.put(tabletId, replica.getBackendId(), replica);
|
||||
replicaToTabletMap.put(replica.getId(), tabletId);
|
||||
backingReplicaMetaTable.put(replica.getBackendId(), tabletId, replica);
|
||||
@ -585,7 +588,8 @@ public class TabletInvertedIndex {
|
||||
public void deleteReplica(long tabletId, long backendId) {
|
||||
long stamp = writeLock();
|
||||
try {
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId));
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId),
|
||||
"tablet " + tabletId + " not exists, backend " + backendId);
|
||||
if (replicaMetaTable.containsRow(tabletId)) {
|
||||
Replica replica = replicaMetaTable.remove(tabletId, backendId);
|
||||
replicaToTabletMap.remove(replica.getId());
|
||||
@ -606,7 +610,8 @@ public class TabletInvertedIndex {
|
||||
public Replica getReplica(long tabletId, long backendId) {
|
||||
long stamp = readLock();
|
||||
try {
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId), tabletId);
|
||||
Preconditions.checkState(tabletMetaMap.containsKey(tabletId),
|
||||
"tablet " + tabletId + " not exists, backend " + backendId);
|
||||
return replicaMetaTable.get(tabletId, backendId);
|
||||
} finally {
|
||||
readUnlock(stamp);
|
||||
@ -749,7 +754,7 @@ public class TabletInvertedIndex {
|
||||
Preconditions.checkNotNull(tabletMeta, "invalid tablet " + tabletId);
|
||||
Preconditions.checkState(
|
||||
!Env.getCurrentColocateIndex().isColocateTable(tabletMeta.getTableId()),
|
||||
"should not be the colocate table");
|
||||
"table " + tabletMeta.getTableId() + " should not be the colocate table");
|
||||
|
||||
TStorageMedium medium = tabletMeta.getStorageMedium();
|
||||
Table<Long, Long, Map<Long, Long>> partitionReplicasInfo = partitionReplicasInfoMaps.get(medium);
|
||||
|
||||
Reference in New Issue
Block a user