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 @@ -39,6 +39,7 @@
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteUuid;
import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.plugin.extensions.communication.MessageSerializer;

/**
*
Expand Down Expand Up @@ -184,8 +185,14 @@
/** */
protected void prepareMarshal(Message msg) throws IgniteCheckedException {
try {
if (msg instanceof CalciteContextMarshallableMessage)
if (msg instanceof CalciteContextMarshallableMessage) {
((CalciteContextMarshallableMessage)msg).prepareMarshal(ctx);

MessageSerializer ser = ctx.gridIO().messageFactory().serializer(msg.directType());

Check warning on line 191 in modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/MessageServiceImpl.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Provide the parametrized type for this generic.

See more on https://sonarcloud.io/project/issues?id=apache_ignite&issues=AZ4SzQJPHiNwq88h2NeV&open=AZ4SzQJPHiNwq88h2NeV&pullRequest=13095

if (ser != null)
ser.prepareMarshalCacheObjects(msg, ctx, null);
}
}
catch (Exception e) {
failureProcessor().process(new FailureContext(FailureType.CRITICAL_ERROR, e));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.query.calcite.exec.ExecutionContext;
import org.apache.ignite.plugin.extensions.communication.CacheIdAware;

/**
* Class to pass to remote nodes transaction changes.
Expand All @@ -38,7 +39,7 @@
* @see ExecutionContext#transactionChanges(int, int[], Function, Comparator)
* @see QueryStartRequest#queryTransactionEntries()
*/
public class QueryTxEntry implements CalciteContextMarshallableMessage {
public class QueryTxEntry implements CalciteContextMarshallableMessage, CacheIdAware {
/** Cache id. */
@Order(0)
int cacheId;
Expand Down Expand Up @@ -75,8 +76,8 @@
this.ver = ver;
}

/** @return Cache id. */
public int cacheId() {
/** {@inheritDoc} */
@Override public int cacheId() {
return cacheId;
}

Expand All @@ -96,13 +97,7 @@
}

/** {@inheritDoc} */
@Override public void prepareMarshal(GridCacheSharedContext<?, ?> ctx) throws IgniteCheckedException {

Check failure on line 100 in modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/message/QueryTxEntry.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.

See more on https://sonarcloud.io/project/issues?id=apache_ignite&issues=AZ30CgSw7CXUX8I4RO9B&open=AZ30CgSw7CXUX8I4RO9B&pullRequest=13095
CacheObjectContext coctx = ctx.cacheContext(cacheId).cacheObjectContext();

key.prepareMarshal(coctx);

if (val != null)
val.prepareMarshal(coctx);
}

/** {@inheritDoc} */
Expand Down
Loading
Loading