Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
dcad3e8
raw
Vladsz83 Jul 30, 2026
26f0524
raw
Vladsz83 Jul 30, 2026
aec0349
fix
Vladsz83 Jul 31, 2026
14326f4
Merge branch 'master' into IGNITE-28790-Use-MessageSerializer-to-tran…
Vladsz83 Jul 31, 2026
f115184
+ master
Vladsz83 Jul 31, 2026
0587132
fix
Vladsz83 Jul 31, 2026
a50ab96
in-progress
Vladsz83 Jul 31, 2026
bc3023c
+ master, fixes
Vladsz83 Jul 31, 2026
fc17c48
+ master, fixes
Vladsz83 Jul 31, 2026
2235e1c
Merge remote-tracking branch 'my/IGNITE-28790-Use-MessageSerializer-t…
Vladsz83 Jul 31, 2026
bfe7830
fix
Vladsz83 Aug 3, 2026
5b7d504
fix
Vladsz83 Aug 3, 2026
fa3f2c4
fix
Vladsz83 Aug 3, 2026
5228506
revert field reordering
Vladsz83 Aug 3, 2026
f0710e6
fixes
Vladsz83 Aug 3, 2026
64808c1
fixes
Vladsz83 Aug 3, 2026
ddcac84
fix
Vladsz83 Aug 3, 2026
dc22e20
fix
Vladsz83 Aug 3, 2026
a65c335
fix
Vladsz83 Aug 4, 2026
70c8d1b
fix
Vladsz83 Aug 4, 2026
18d0268
fix
Vladsz83 Aug 4, 2026
952ce55
fix
Vladsz83 Aug 4, 2026
4dc2fff
Merge branch 'master' into IGNITE-28790-Use-MessageSerializer-to-tran…
Vladsz83 Aug 4, 2026
1292013
fix
Vladsz83 Aug 4, 2026
84da647
fix
Vladsz83 Aug 4, 2026
f9b5c73
+ master
Vladsz83 Aug 4, 2026
bccd8eb
minority
Vladsz83 Aug 4, 2026
be1c9a3
fixes
Vladsz83 Aug 4, 2026
42f5874
Merge remote-tracking branch 'my/IGNITE-28790-Use-MessageSerializer-t…
Vladsz83 Aug 4, 2026
4781d9e
impl
Vladsz83 Aug 4, 2026
8f0ab1c
renaming
Vladsz83 Aug 4, 2026
aa034fd
Merge branch 'master' into IGNITE-28790-Use-MessageSerializer-to-tran…
Vladsz83 Aug 5, 2026
a730c06
test fixes
Vladsz83 Aug 5, 2026
75c0082
raw
Vladsz83 Aug 5, 2026
1f5a7fb
test fixes
Vladsz83 Aug 5, 2026
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 @@ -179,7 +179,9 @@
import org.apache.ignite.internal.processors.cache.query.GridCacheQueryResponse;
import org.apache.ignite.internal.processors.cache.query.GridCacheSqlQuery;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryBatchAck;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryDeployableObject;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryEntry;
import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryHandler;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
import org.apache.ignite.internal.processors.cache.transactions.TxEntryValueHolder;
Expand All @@ -201,7 +203,13 @@
import org.apache.ignite.internal.processors.cluster.DiscoveryDataClusterState;
import org.apache.ignite.internal.processors.cluster.NodeFullMetricsMessage;
import org.apache.ignite.internal.processors.cluster.NodeMetricsMessage;
import org.apache.ignite.internal.processors.continuous.ContinousRoutineDiscoveryData;
import org.apache.ignite.internal.processors.continuous.ContinousRoutineDiscoveryDataItem;
import org.apache.ignite.internal.processors.continuous.ContinousRoutineLocalInfo;
import org.apache.ignite.internal.processors.continuous.ContinuousRoutineInfo;
import org.apache.ignite.internal.processors.continuous.ContinuousRoutineStartResultMessage;
import org.apache.ignite.internal.processors.continuous.ContinuousRoutinesCommonDiscoveryData;
import org.apache.ignite.internal.processors.continuous.ContinuousRoutinesJoiningNodeDiscoveryData;
import org.apache.ignite.internal.processors.continuous.GridContinuousMessage;
import org.apache.ignite.internal.processors.continuous.StartRequestData;
import org.apache.ignite.internal.processors.continuous.StartRoutineAckDiscoveryMessage;
Expand Down Expand Up @@ -624,6 +632,16 @@ public CoreMessagesProvider(Marshaller dfltMarsh, Marshaller schemaAwareMarsh) {
register(QueryProposalsDataBagItem.class);
register(QueryEntityMessage.class);
register(QueryEntityExMessage.class);
register(ContinuousRoutineInfo.class);
register(ContinuousRoutinesJoiningNodeDiscoveryData.class);
register(CacheContinuousQueryDeployableObject.class);
register(CacheContinuousQueryHandler.class);
register(GridEventConsumeHandler.class);
register(GridMessageListenHandler.class);
register(ContinousRoutineLocalInfo.class);
register(ContinousRoutineDiscoveryDataItem.class);
register(ContinousRoutineDiscoveryData.class);
register(ContinuousRoutinesCommonDiscoveryData.class);

// [11200 - 11300]: Compute, distributed process messages.
msgIdx = 11200;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,9 @@
/**
* Continuous routine handler for remote event listening.
*/
class GridEventConsumeHandler implements GridContinuousHandler {
/** */
private static final long serialVersionUID = 0L;

public final class GridEventConsumeHandler implements GridContinuousHandler, MarshallableMessage {
/** Default callback. */
private static final IgniteBiPredicate<UUID, Event> DFLT_CALLBACK = new P2<UUID, Event>() {
private static final IgniteBiPredicate<UUID, Event> DFLT_CALLBACK = new P2<>() {
@Override public boolean apply(UUID uuid, Event e) {
return true;
}
Expand All @@ -76,28 +73,32 @@ class GridEventConsumeHandler implements GridContinuousHandler {
private IgniteBiPredicate<UUID, Event> cb;

/** Filter. */
private IgnitePredicate<Event> filter;
@Nullable volatile IgnitePredicate<Event> filter;

/** Serialized filter. */
private byte[] filterBytes;
/** Marshaled {@link #filter}. */
@Order(0)
@Nullable volatile byte[] filterBytes;

/** Deployment class name. */
private String clsName;
/** Deployment class name. Is {@code null} if P2P deployment is disabled. */
@Order(1)
@Nullable volatile String clsName;

/** Deployment info. */
private GridDeploymentInfo depInfo;
/** Deployment info. Is {@code null} if P2P deployment is disabled. */
@Order(2)
@Nullable volatile GridDeploymentInfoBean depInfo;

/** Types. */
private int[] types;
@Order(3)
int[] types;

/** Listener. */
private GridLocalEventListener lsnr;

/** P2P unmarshalling future. */
private IgniteInternalFuture<Void> p2pUnmarshalFut = new GridFinishedFuture<>();
private volatile IgniteInternalFuture<Void> p2pUnmarshalFut = new GridFinishedFuture<>();

/**
* Required by {@link Externalizable}.
* Empty constructor for serialization purposes.
*/
public GridEventConsumeHandler() {
// No-op.
Expand Down Expand Up @@ -225,8 +226,6 @@ private void initFilter(IgnitePredicate<Event> filter, GridKernalContext ctx) th
EventWrapper wrapper = new EventWrapper(evt);

if (evt instanceof CacheEvent) {
String cacheName = ((CacheEvent)evt).cacheName();

ClusterNode node = ctx.discovery().node(t3.get1());

if (node == null)
Expand Down Expand Up @@ -389,11 +388,19 @@ private boolean filterDropsEvent(Event evt) {
}

/** {@inheritDoc} */
@Override public void p2pMarshal(GridKernalContext ctx) throws IgniteCheckedException {
@Override public void prepareToMarshal(GridKernalContext ctx, boolean p2p) throws IgniteCheckedException {
assert ctx != null;
assert ctx.config().isPeerClassLoadingEnabled();

if (filter != null) {
// TODO : Remove this check after https://issues.apache.org/jira/browse/IGNITE-28945
if (filterBytes != null)
return;

if (filter == null)
return;

if (p2p) {
assert ctx.config().isPeerClassLoadingEnabled();

Class cls = U.detectClass(filter);

clsName = cls.getName();
Expand All @@ -404,18 +411,32 @@ private boolean filterDropsEvent(Event evt) {
throw new IgniteDeploymentCheckedException("Failed to deploy event filter: " + filter);

depInfo = new GridDeploymentInfoBean(dep);

filterBytes = U.marshal(ctx.marshaller(), filter);
}

filterBytes = U.marshal(ctx.marshaller(), filter);
}

/** Presents due to {@link MarshallableMessage}'s {@link #unmarshal(Marshaller, ClassLoader)}. */
@Override public void marshal(Marshaller marsh) throws IgniteCheckedException {
// No-op.
}

/** {@inheritDoc} */
@Override public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws IgniteCheckedException {
assert nodeId != null;
@Override public void finishUnmarshal(UUID nodeId, GridKernalContext ctx, boolean p2p) throws IgniteCheckedException {
assert ctx != null;
assert ctx.config().isPeerClassLoadingEnabled();

if (filterBytes != null) {
// TODO : Remove this check after https://issues.apache.org/jira/browse/IGNITE-28945
if (filter != null)
return;

if (filterBytes == null)
return;

if (p2p) {
assert nodeId != null;
assert ctx.config().isPeerClassLoadingEnabled();
assert clsName != null && depInfo != null;

try {
GridDeployment dep = ctx.deploy().getGlobalDeployment(depInfo.deployMode(), clsName, clsName,
depInfo.userVersion(), nodeId, depInfo.classLoaderId(), depInfo.participants(), null);
Expand All @@ -438,6 +459,17 @@ private boolean filterDropsEvent(Event evt) {
throw new IgniteCheckedException("Failed to unmarshal deployable object.", e);
}
}
else
filter = U.unmarshal(ctx.marshaller(), filterBytes, U.resolveClassLoader(ctx.config()));
}

/** Presents to reset {@link #p2pUnmarshalFut} is case of the P2P-deployment. */
@Override public void unmarshal(Marshaller marsh, ClassLoader clsLdr) throws IgniteCheckedException {
assert (clsName == null) == (depInfo == null);

/** Are unmarshaled in {@link #finishUnmarshal(UUID, GridKernalContext, boolean)}. */
if (depInfo != null)
p2pUnmarshalFut = new GridFutureAdapter<>();
}

/** {@inheritDoc} */
Expand Down Expand Up @@ -470,39 +502,6 @@ private boolean filterDropsEvent(Event evt) {
}
}

/** {@inheritDoc} */
@Override public void writeExternal(ObjectOutput out) throws IOException {
boolean b = filterBytes != null;

out.writeBoolean(b);

if (b) {
U.writeByteArray(out, filterBytes);
U.writeString(out, clsName);
out.writeObject(depInfo);
}
else
out.writeObject(filter);

out.writeObject(types);
}

/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
boolean b = in.readBoolean();

if (b) {
p2pUnmarshalFut = new GridFutureAdapter<>();
filterBytes = U.readByteArray(in);
clsName = U.readString(in);
depInfo = (GridDeploymentInfo)in.readObject();
}
else
filter = (IgnitePredicate<Event>)in.readObject();

types = (int[])in.readObject();
}

/**
* Event wrapper.
*/
Expand Down
Loading