Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
75e1010
IGNITE-23840 Remove IgniteFeatures#DIFFERENT_REBALANCE_POOL_SIZE and …
nizhikov Dec 4, 2024
283f139
IGNITE-23841 Remove IgniteFeatures#CLUSTER_READ_ONLY_MODE and related…
nizhikov Dec 4, 2024
697a7e1
IGNITE-23841 Remove IgniteFeatures#TRANSACTION_OWNER_THREAD_DUMP_PROV…
nizhikov Dec 4, 2024
2d100d6
IGNITE-23841 Remove IgniteFeatures#TRANSACTION_OWNER_THREAD_DUMP_PROV…
nizhikov Dec 4, 2024
9b989ec
IGNITE-23841 Remove IgniteFeatures#TRANSACTION_OWNER_THREAD_DUMP_PROV…
nizhikov Dec 4, 2024
1573509
IGNITE-23841 Remove IgniteFeatures#SUSPEND_RESUME_PESSIMISTIC_TX and …
nizhikov Dec 4, 2024
c1b009d
IGNITE-23841 Remove IgniteFeatures#MASTER_KEY_CHANGE and related code
nizhikov Dec 4, 2024
aa49ab0
IGNITE-23845 Remove IgniteFeatures#CONT_QRY_SECURITY_AWARE and relate…
nizhikov Dec 4, 2024
e4aeee7
IGNITE-23846 Remove IgniteFeatures#PERSISTENCE_CACHE_SNAPSHOT and rel…
nizhikov Dec 4, 2024
949055f
IGNITE-23846 Remove IgniteFeatures#PERSISTENCE_CACHE_SNAPSHOT and rel…
nizhikov Dec 4, 2024
fe48c75
IGNITE-23846 Remove IgniteFeatures#PERSISTENCE_CACHE_SNAPSHOT and rel…
nizhikov Dec 4, 2024
550837c
IGNITE-23846 Remove IgniteFeatures#PERSISTENCE_CACHE_SNAPSHOT and rel…
nizhikov Dec 4, 2024
7ae2f3b
IGNITE-23846 Remove IgniteFeatures#PERSISTENCE_CACHE_SNAPSHOT and rel…
nizhikov Dec 4, 2024
ec98f5b
IGNITE-23846 Remove IgniteFeatures#PERSISTENCE_CACHE_SNAPSHOT and rel…
nizhikov Dec 4, 2024
5fd6696
IGNITE-23846 Remove IgniteFeatures#DATA_PACKET_COMPRESSION and relate…
nizhikov Dec 4, 2024
cc44089
IGNITE-23846 Remove IgniteFeatures#DATA_PACKET_COMPRESSION and relate…
nizhikov Dec 4, 2024
4db0813
IGNITE-23846 Remove IgniteFeatures#DATA_PACKET_COMPRESSION and relate…
nizhikov Dec 4, 2024
7c1b7f7
IGNITE-23846 Remove IgniteFeatures#DATA_PACKET_COMPRESSION and relate…
nizhikov Dec 4, 2024
edfbe72
IGNITE-23846 Remove IgniteFeatures#TCP_COMMUNICATION_SPI_HANDSHAKE_WA…
nizhikov Dec 4, 2024
eee15cf
IGNITE-23851 Remove IgniteFeatures#DISTRIBUTED_METASTORAGE and relate…
nizhikov Dec 4, 2024
e9e6862
IGNITE-23851 Remove IgniteFeatures#DISTRIBUTED_METASTORAGE and relate…
nizhikov Dec 4, 2024
d2c92cc
Merge branch 'master' into IGNITE-23851
nizhikov Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public enum IgniteFeatures {
/** Support of splitted cache configurations to avoid broken deserialization on non-affinity nodes. */
SPLITTED_CACHE_CONFIGURATIONS(5),

/** Distributed metastorage. */
DISTRIBUTED_METASTORAGE(11),

/** Partition Map Exchange-free switch on baseline node left at fully rebalanced cluster. */
PME_FREE_SWITCH(19),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.apache.ignite.internal.processors.configuration.distributed.DistributedChangeableProperty;
import org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationLifecycleListener;
import org.apache.ignite.internal.processors.configuration.distributed.DistributedPropertyDispatcher;
import org.apache.ignite.internal.processors.metastorage.ReadableDistributedMetaStorage;
import org.apache.ignite.internal.util.future.GridFutureAdapter;

import static org.apache.ignite.IgniteSystemProperties.IGNITE_DUMP_TX_COLLISIONS_INTERVAL;
Expand Down Expand Up @@ -160,44 +159,30 @@ public DistributedTransactionConfiguration(
}

@Override public void onReadyToWrite() {
if (ReadableDistributedMetaStorage.isSupported(ctx)) {
setDefaultValue(
longOperationsDumpTimeout,
dfltLongOpsDumpTimeout,
log);
setDefaultValue(
longTransactionTimeDumpThreshold,
dfltLongTransactionTimeDumpThreshold,
log);
setDefaultValue(
transactionTimeDumpSamplesCoefficient,
dfltTransactionTimeDumpSamplesCoefficient,
log);
setDefaultValue(
longTransactionTimeDumpSamplesPerSecondLimit,
dfltLongTransactionTimeDumpSamplesPerSecondLimit,
log);
setDefaultValue(
collisionsDumpInterval,
dfltCollisionsDumpInterval,
log);
setDefaultValue(
txOwnerDumpRequestsAllowed,
dfltTxOwnerDumpRequestsAllowed,
log);
}
else {
log.warning("Distributed metastorage is not supported. " +
"All distributed transaction configuration parameters are unavailable. " +
"Default values will be set.");

longOperationsDumpTimeout.localUpdate(dfltLongOpsDumpTimeout);
longTransactionTimeDumpThreshold.localUpdate(dfltLongTransactionTimeDumpThreshold);
transactionTimeDumpSamplesCoefficient.localUpdate(dfltTransactionTimeDumpSamplesCoefficient);
longTransactionTimeDumpSamplesPerSecondLimit.localUpdate(dfltLongTransactionTimeDumpSamplesPerSecondLimit);
collisionsDumpInterval.localUpdate(dfltCollisionsDumpInterval);
txOwnerDumpRequestsAllowed.localUpdate(dfltTxOwnerDumpRequestsAllowed);
}
setDefaultValue(
longOperationsDumpTimeout,
dfltLongOpsDumpTimeout,
log);
setDefaultValue(
longTransactionTimeDumpThreshold,
dfltLongTransactionTimeDumpThreshold,
log);
setDefaultValue(
transactionTimeDumpSamplesCoefficient,
dfltTransactionTimeDumpSamplesCoefficient,
log);
setDefaultValue(
longTransactionTimeDumpSamplesPerSecondLimit,
dfltLongTransactionTimeDumpSamplesPerSecondLimit,
log);
setDefaultValue(
collisionsDumpInterval,
dfltCollisionsDumpInterval,
log);
setDefaultValue(
txOwnerDumpRequestsAllowed,
dfltTxOwnerDumpRequestsAllowed,
log);
}
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,18 @@
package org.apache.ignite.internal.processors.metastorage;

import java.io.Serializable;
import java.util.Collection;
import java.util.function.BiConsumer;
import java.util.function.Predicate;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteFeatures;
import org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi;
import org.apache.ignite.spi.discovery.DiscoverySpi;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import static org.apache.ignite.internal.IgniteFeatures.DISTRIBUTED_METASTORAGE;

/**
* API for distributed data storage. Gives the ability to store configuration data (or any other data)
* consistently and cluster-wide. It is guaranteed that every read value is the same on every node in the cluster
* all the time.
*/
public interface ReadableDistributedMetaStorage {
/**
* @return {@code True} if all nodes in the cluster support discributed metastorage feature.
* @see IgniteFeatures#DISTRIBUTED_METASTORAGE
*/
public static boolean isSupported(GridKernalContext ctx) {
DiscoverySpi discoSpi = ctx.config().getDiscoverySpi();

if (discoSpi instanceof IgniteDiscoverySpi)
return ((IgniteDiscoverySpi)discoSpi).allNodesSupport(DISTRIBUTED_METASTORAGE);
else {
Collection<ClusterNode> nodes = discoSpi.getRemoteNodes();

return IgniteFeatures.allNodesSupports(nodes, DISTRIBUTED_METASTORAGE);
}
}

/**
* Get the total number of updates (write/remove) that metastorage ever had.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,13 @@
import org.apache.ignite.internal.processors.subscription.GridInternalSubscriptionProcessor;
import org.apache.ignite.internal.util.IgniteUtils;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteBiTuple;
import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.lang.IgniteProducer;
import org.apache.ignite.marshaller.jdk.JdkMarshaller;
import org.apache.ignite.spi.IgniteNodeValidationResult;
import org.apache.ignite.spi.IgniteSpiException;
import org.apache.ignite.spi.discovery.DiscoveryDataBag;
import org.apache.ignite.spi.discovery.DiscoveryDataBag.GridDiscoveryData;
import org.apache.ignite.spi.discovery.DiscoveryDataBag.JoiningNodeDiscoveryData;
Expand All @@ -83,7 +81,6 @@
import static org.apache.ignite.IgniteSystemProperties.IGNITE_GLOBAL_METASTORAGE_HISTORY_MAX_BYTES;
import static org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType.META_STORAGE;
import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isPersistenceEnabled;
import static org.apache.ignite.internal.processors.metastorage.ReadableDistributedMetaStorage.isSupported;
import static org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageHistoryItem.EMPTY_ARRAY;
import static org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageUtil.historyItemPrefix;
import static org.apache.ignite.internal.processors.metastorage.persistence.DistributedMetaStorageUtil.historyItemVer;
Expand Down Expand Up @@ -121,10 +118,6 @@ public class DistributedMetaStorageImpl extends GridProcessorAdapter
/** Default upper bound of history size in bytes. */
public static final long DFLT_MAX_HISTORY_BYTES = 100 * 1024 * 1024;

/** Message indicating that clusted is in a mixed state and writing cannot be completed because of that. */
public static final String NOT_SUPPORTED_MSG = "Ignite cluster has nodes that don't support" +
" distributed metastorage feature. Writing cannot be completed.";

/** Name of the system view for a system {@link MetaStorage}. */
public static final String DISTRIBUTED_METASTORE_VIEW = metricName("distributed", "metastorage");

Expand Down Expand Up @@ -642,19 +635,6 @@ private int getBaselineTopologyId() {
try {
DistributedMetaStorageVersion locVer = ver;

if (!discoData.hasJoiningNodeData()) {
// Joining node doesn't support distributed metastorage feature.

if (isSupported(ctx) && locVer.id() > 0 && !node.isClient()) {
String errorMsg = "Node not supporting distributed metastorage feature" +
" is not allowed to join the cluster";

return new IgniteNodeValidationResult(node.id(), errorMsg);
}
else
return null;
}

DistributedMetaStorageJoiningNodeData joiningData = getJoiningNodeData(discoData);

if (joiningData == null) {
Expand Down Expand Up @@ -796,9 +776,6 @@ private String validatePayload(DistributedMetaStorageJoiningNodeData joiningData

DistributedMetaStorageVersion remoteVer = joiningData.ver;

if (!isSupported(ctx) && remoteVer.id() > 0)
return;

lock.writeLock().lock();

try {
Expand Down Expand Up @@ -850,9 +827,6 @@ private String validatePayload(DistributedMetaStorageJoiningNodeData joiningData
if (!discoData.hasJoiningNodeData())
return;

if (!isSupported(ctx))
return;

DistributedMetaStorageJoiningNodeData joiningData = getJoiningNodeData(discoData);

if (joiningData == null)
Expand Down Expand Up @@ -1071,7 +1045,7 @@ else if (!isClient && ver.id() > 0) {
private GridFutureAdapter<?> startWrite(String key, byte[] valBytes) throws IgniteCheckedException {
UUID reqId = UUID.randomUUID();

GridFutureAdapter<?> fut = prepareWriteFuture(key, reqId);
GridFutureAdapter<?> fut = prepareWriteFuture(reqId);

if (fut.isDone())
return fut;
Expand All @@ -1090,7 +1064,7 @@ private GridFutureAdapter<Boolean> startCas(String key, byte[] expValBytes, byte
throws IgniteCheckedException {
UUID reqId = UUID.randomUUID();

GridFutureAdapter<Boolean> fut = prepareWriteFuture(key, reqId);
GridFutureAdapter<Boolean> fut = prepareWriteFuture(reqId);

if (fut.isDone())
return fut;
Expand All @@ -1113,27 +1087,7 @@ private GridFutureAdapter<Boolean> startCas(String key, byte[] expValBytes, byte
* @return Future that must be returned immediately or {@code null}.
* @throws IgniteCheckedException If cluster can't perform this update.
*/
private GridFutureAdapter<Boolean> prepareWriteFuture(String key, UUID reqId) throws IgniteCheckedException {
boolean supported;

try {
supported = isSupported(ctx);
}
catch (Exception e) {
if (X.hasCause(e, IgniteSpiException.class) && e.getMessage() != null && e.getMessage().contains("Node stopped.")) {
GridFutureAdapter<Boolean> fut = new GridFutureAdapter<>();

fut.onDone(nodeStoppingException());

return fut;
}

throw e;
}

if (!supported)
throw new IgniteCheckedException(NOT_SUPPORTED_MSG);

private GridFutureAdapter<Boolean> prepareWriteFuture(UUID reqId) {
GridFutureAdapter<Boolean> fut = new GridFutureAdapter<>();

updateFutsStopLock.readLock().lock();
Expand Down Expand Up @@ -1170,12 +1124,6 @@ private void onUpdateMessage(
if (msg.errorMessage() != null)
return;

if (!isSupported(ctx)) {
msg.errorMessage(NOT_SUPPORTED_MSG);

return;
}

lock.writeLock().lock();

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationLifecycleListener;
import org.apache.ignite.internal.processors.configuration.distributed.DistributedPropertyDispatcher;
import org.apache.ignite.internal.processors.configuration.distributed.SimpleDistributedProperty;
import org.apache.ignite.internal.processors.metastorage.ReadableDistributedMetaStorage;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.apache.ignite.internal.util.typedef.internal.A;

Expand Down Expand Up @@ -80,19 +79,10 @@ protected DistributedSqlConfiguration(

@SuppressWarnings("deprecation")
@Override public void onReadyToWrite() {
if (ReadableDistributedMetaStorage.isSupported(ctx)) {
setDefaultValue(
dfltQryTimeout,
(int)ctx.config().getSqlConfiguration().getDefaultQueryTimeout(),
log);
}
else {
log.warning("Distributed metastorage is not supported. " +
"All distributed SQL configuration parameters are unavailable.");

// Set properties to default.
dfltQryTimeout.localUpdate((int)ctx.config().getSqlConfiguration().getDefaultQueryTimeout());
}
setDefaultValue(
dfltQryTimeout,
(int)ctx.config().getSqlConfiguration().getDefaultQueryTimeout(),
log);
}
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.apache.ignite.internal.processors.configuration.distributed.DistributedConfigurationLifecycleListener;
import org.apache.ignite.internal.processors.configuration.distributed.DistributedPropertyDispatcher;
import org.apache.ignite.internal.processors.configuration.distributed.SimpleDistributedProperty;
import org.apache.ignite.internal.processors.metastorage.ReadableDistributedMetaStorage;
import org.apache.ignite.internal.processors.query.DistributedSqlConfiguration;
import org.apache.ignite.internal.util.future.GridFutureAdapter;

Expand Down Expand Up @@ -89,25 +88,15 @@ public DistributedIndexingConfiguration(
}

@Override public void onReadyToWrite() {
if (ReadableDistributedMetaStorage.isSupported(ctx)) {
setDefaultValue(
disabledSqlFuncs,
DFLT_DISABLED_FUNCS,
log);

setDefaultValue(
disableCreateLuceneIndexForStringValueType,
false,
log);
}
else {
log.warning("Distributed metastorage is not supported. " +
"All distributed SQL configuration parameters are unavailable.");

// Set properties to default.
disabledSqlFuncs.localUpdate(null);
disableCreateLuceneIndexForStringValueType.localUpdate(false);
}
setDefaultValue(
disabledSqlFuncs,
DFLT_DISABLED_FUNCS,
log);

setDefaultValue(
disableCreateLuceneIndexForStringValueType,
false,
log);
}
}
);
Expand Down