mirror of https://github.com/apache/cassandra
disable TableId interning
This commit is contained in:
parent
aeaa07b000
commit
570d65249f
|
|
@ -890,7 +890,7 @@ public class AccordService implements IAccordService, Shutdownable
|
|||
asyncTxnResult.tryFailure(newTimeout(txnId, txn.isWrite(), consistencyLevel));
|
||||
return;
|
||||
}
|
||||
if (cause instanceof Preempted)
|
||||
if (cause instanceof Preempted || cause instanceof Invalidated)
|
||||
{
|
||||
metrics.preempted.mark();
|
||||
//TODO need to improve
|
||||
|
|
|
|||
|
|
@ -35,13 +35,13 @@ import accord.local.Command;
|
|||
import accord.local.KeyHistory;
|
||||
import accord.local.RedundantBefore;
|
||||
import accord.primitives.PartialDeps;
|
||||
import accord.primitives.Participants;
|
||||
import accord.primitives.Routable.Domain;
|
||||
import accord.primitives.SaveStatus;
|
||||
import accord.primitives.Status;
|
||||
import accord.primitives.Range;
|
||||
import accord.primitives.Ranges;
|
||||
import accord.primitives.Routables;
|
||||
import accord.primitives.Seekables;
|
||||
import accord.primitives.Timestamp;
|
||||
import accord.primitives.TxnId;
|
||||
import accord.utils.async.AsyncChains;
|
||||
|
|
@ -252,7 +252,7 @@ public class CommandsForRangesLoader implements AccordStateCache.Listener<TxnId,
|
|||
if (cmd.partialTxn() == null)
|
||||
return null;
|
||||
|
||||
Seekables<?, ? extends Seekables<?, ?>> keysOrRanges = cmd.partialTxn().keys();
|
||||
Participants<?> keysOrRanges = cmd.participants().touches();
|
||||
if (keysOrRanges.domain() != Domain.Range)
|
||||
throw new AssertionError(String.format("Txn keys are not range for %s", cmd.partialTxn()));
|
||||
Ranges ranges = (Ranges) keysOrRanges;
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ public abstract class AccordRoutingKey extends AccordRoutableKey implements Rout
|
|||
@Override
|
||||
public SentinelKey deserialize(DataInputPlus in, int version) throws IOException
|
||||
{
|
||||
TableId table = TableId.deserialize(in).tryIntern();
|
||||
TableId table = TableId.deserialize(in);
|
||||
boolean isMin = in.readBoolean();
|
||||
return new SentinelKey(table, isMin);
|
||||
}
|
||||
|
|
@ -287,14 +287,14 @@ public abstract class AccordRoutingKey extends AccordRoutableKey implements Rout
|
|||
@Override
|
||||
public TokenKey deserialize(DataInputPlus in, int version) throws IOException
|
||||
{
|
||||
TableId table = TableId.deserialize(in).tryIntern();
|
||||
TableId table = TableId.deserialize(in);
|
||||
Token token = Token.compactSerializer.deserialize(in, getPartitioner(), version);
|
||||
return new TokenKey(table, token);
|
||||
}
|
||||
|
||||
public TokenKey fromBytes(ByteBuffer bytes, IPartitioner partitioner)
|
||||
{
|
||||
TableId tableId = TableId.deserialize(bytes, ByteBufferAccessor.instance, 0).tryIntern();
|
||||
TableId tableId = TableId.deserialize(bytes, ByteBufferAccessor.instance, 0);
|
||||
bytes.position(tableId.serializedSize());
|
||||
Token token = Token.compactSerializer.deserialize(bytes, partitioner);
|
||||
return new TokenKey(tableId, token);
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ public final class PartitionKey extends AccordRoutableKey implements Key
|
|||
@Override
|
||||
public PartitionKey deserialize(DataInputPlus in, int version) throws IOException
|
||||
{
|
||||
TableId tableId = TableId.deserialize(in).tryIntern();
|
||||
TableId tableId = TableId.deserialize(in);
|
||||
IPartitioner partitioner = Schema.instance.getExistingTablePartitioner(tableId);
|
||||
DecoratedKey key = partitioner.decorateKey(ByteBufferUtil.readWithShortLength(in));
|
||||
return new PartitionKey(tableId, key);
|
||||
|
|
@ -162,7 +162,7 @@ public final class PartitionKey extends AccordRoutableKey implements Key
|
|||
|
||||
public <V> PartitionKey deserialize(V src, ValueAccessor<V> accessor, int offset) throws IOException
|
||||
{
|
||||
TableId tableId = TableId.deserialize(src, accessor, offset).tryIntern();
|
||||
TableId tableId = TableId.deserialize(src, accessor, offset);
|
||||
offset += tableId.serializedSize();
|
||||
TableMetadata metadata = Schema.instance.getTableMetadata(tableId);
|
||||
int numBytes = accessor.getShort(src, offset);
|
||||
|
|
|
|||
Loading…
Reference in New Issue