Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -62,6 +62,7 @@
* @see EventType#EVT_NODE_JOINED
* @see EventType#EVT_NODE_LEFT
* @see EventType#EVT_NODE_SEGMENTED
* @see EventType#EVT_NODE_VALIDATION_FAILED
* @see EventType#EVTS_DISCOVERY_ALL
* @see EventType#EVTS_DISCOVERY
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ public interface EventType {
EVT_NODE_JOINED,
EVT_NODE_LEFT,
EVT_NODE_FAILED,
EVT_NODE_VALIDATION_FAILED,
EVT_NODE_SEGMENTED,
EVT_CLIENT_NODE_DISCONNECTED,
EVT_CLIENT_NODE_RECONNECTED
Expand All @@ -1119,6 +1120,7 @@ public interface EventType {
EVT_NODE_LEFT,
EVT_NODE_FAILED,
EVT_NODE_SEGMENTED,
EVT_NODE_VALIDATION_FAILED,
EVT_NODE_METRICS_UPDATED,
EVT_CLIENT_NODE_DISCONNECTED,
EVT_CLIENT_NODE_RECONNECTED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@
* @see EventType#EVT_NODE_VALIDATION_FAILED
* @see GridComponent#validateNode
*/
public class NodeValidationFailedEvent extends EventAdapter {
public class NodeValidationFailedEvent extends DiscoveryEvent {
/** */
private static final long serialVersionUID = 0L;

/** The node that attempted to join cluster. */
private final ClusterNode evtNode;

/** Validation result. */
private final IgniteNodeValidationResult res;

Expand All @@ -49,17 +46,11 @@ public class NodeValidationFailedEvent extends EventAdapter {
* @param res Joining node validation result.
*/
public NodeValidationFailedEvent(ClusterNode node, ClusterNode evtNode, IgniteNodeValidationResult res) {
super(node, res.message(), EVT_NODE_VALIDATION_FAILED);
super(node, res.message(), EVT_NODE_VALIDATION_FAILED, evtNode);

this.evtNode = evtNode;
this.res = res;
}

/** @return Node that couldn't join the topology due to a validation failure. */
public ClusterNode eventNode() {
return evtNode;
}

/** @return Joining node validation result. */
public IgniteNodeValidationResult validationResult() {
return res;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ public CoreMessagesProvider(Marshaller dfltMarsh, Marshaller schemaAwareMarsh, C
withNoSchema(GroupKeyEncrypted.class);
withNoSchema(NodeEncryptionKeys.class);

// [13000 - 13300]: Control, configuration, diagnostincs and other messages.
// [13000 - 13300]: Control, configuration, diagnostics and other messages.
msgIdx = 13000;
withSchema(GridEventStorageMessage.class);
withNoSchema(ChangeGlobalStateMessage.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ enum DiscoveryDataExchangeType {
PERFORMANCE_STAT_PROC,

/** Event storage manager. */
EVENT_MGR;
EVENT_MGR,

/** Rolling upgrade processor. */
ROLLING_UPGRADE_PROC;

/** Cached values array. */
public static final DiscoveryDataExchangeType[] VALUES = values();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,9 @@ else if (customMsg instanceof ChangeGlobalStateMessage) {
discoEvtHnd.discoCache = discoCache;

if (!ctx.clientDisconnected()) {
// The security processor must be notified first, since {@link IgniteSecurity#onLocalJoin}
ctx.rollingUpgrade().features().onLocalJoin();

// The security processor must be notified second, since {@link IgniteSecurity#onLocalJoin}
// finishes local node security context initialization that can be demanded by other Ignite
// components.
ctx.security().onLocalJoin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/**
* This class is implements {@link IgniteDataTransferObjectSerializer}.
* Most implementation of the interface autogenerated.
* <b>Please, be aware - serializer works while Rolling Upgrade in progress.</b>
* <b>Please, be aware - serializer works while rolling upgrade being n progress.</b>
* All changes must be made with the respece of RU rules.
* <b>
* Note, this class written in PDS!
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.ignite.internal.processors.rollingupgrade;

import java.util.UUID;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.internal.IgniteInternalFuture;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
import org.jetbrains.annotations.Nullable;

/** */
abstract class AbstractProcess {
/** */
@Nullable private UUID activeOpId;

/** */
@Nullable private GridFutureAdapter<Void> activeOpFut;

/** */
protected abstract UUID startInternal() throws IgniteCheckedException;

/** */
public synchronized IgniteInternalFuture<Void> start() throws IgniteCheckedException {
if (activeOpFut != null)
return activeOpFut;

activeOpFut = new GridFutureAdapter<>();
activeOpId = startInternal();

return activeOpFut;
}

/** */
protected synchronized void finishProcess(UUID reqId, @Nullable Throwable err) {
if (!isInitiator(reqId))
return;

activeOpFut.onDone(err);

activeOpId = null;
activeOpFut = null;
}

/** */
private boolean isInitiator(UUID reqId) {
return activeOpFut != null && reqId.equals(activeOpId);
}
}
Loading
Loading