You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "valepakh (via GitHub)" <gi...@apache.org> on 2024/12/02 14:40:27 UTC
[PR] IGNITE-23818 Tuple deserialization results in NPE [ignite-3]
valepakh opened a new pull request, #4815:
URL: https://github.com/apache/ignite-3/pull/4815
https://issues.apache.org/jira/browse/IGNITE-23818
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Fix NPE on Tuple deserialization [ignite-3]
Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815#discussion_r1866132118
##########
modules/api/src/main/java/org/apache/ignite/table/TupleImpl.java:
##########
@@ -358,6 +360,17 @@ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassN
}
}
+ /**
+ * Serializes an object. Required to be implemented in pair with the {@link #readObject(ObjectInputStream)} so that the
+ * {@code StructuredObjectMarshaller#fillStructuredObjectLayerFrom} will actually call the {@link #readObject(ObjectInputStream)}.
+ *
+ * @param out Output object stream.
+ * @throws IOException If failed.
+ */
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
Review Comment:
> Do you mean TupleWithSchemaMarshalling?
Yes.
We should prefer formats that can be used by non-Java clients as well.
##########
modules/api/src/main/java/org/apache/ignite/table/TupleImpl.java:
##########
@@ -358,6 +360,17 @@ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassN
}
}
+ /**
+ * Serializes an object. Required to be implemented in pair with the {@link #readObject(ObjectInputStream)} so that the
+ * {@code StructuredObjectMarshaller#fillStructuredObjectLayerFrom} will actually call the {@link #readObject(ObjectInputStream)}.
+ *
+ * @param out Output object stream.
+ * @throws IOException If failed.
+ */
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
Review Comment:
> Do you mean TupleWithSchemaMarshalling?
Yes.
We should prefer formats that can be used by non-Java clients as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Test tuple from table deserialization [ignite-3]
Posted by "PakhomovAlexander (via GitHub)" <gi...@apache.org>.
PakhomovAlexander merged PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Fix NPE on Tuple deserialization [ignite-3]
Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815#discussion_r1866160428
##########
modules/api/src/main/java/org/apache/ignite/table/TupleImpl.java:
##########
@@ -358,6 +360,17 @@ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassN
}
}
+ /**
+ * Serializes an object. Required to be implemented in pair with the {@link #readObject(ObjectInputStream)} so that the
+ * {@code StructuredObjectMarshaller#fillStructuredObjectLayerFrom} will actually call the {@link #readObject(ObjectInputStream)}.
+ *
+ * @param out Output object stream.
+ * @throws IOException If failed.
+ */
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
Review Comment:
What happens if I run the reproducer in the ticket using the client API?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Fix NPE on Tuple deserialization [ignite-3]
Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815#discussion_r1866112844
##########
modules/api/src/main/java/org/apache/ignite/table/TupleImpl.java:
##########
@@ -358,6 +360,17 @@ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassN
}
}
+ /**
+ * Serializes an object. Required to be implemented in pair with the {@link #readObject(ObjectInputStream)} so that the
+ * {@code StructuredObjectMarshaller#fillStructuredObjectLayerFrom} will actually call the {@link #readObject(ObjectInputStream)}.
+ *
+ * @param out Output object stream.
+ * @throws IOException If failed.
+ */
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
Review Comment:
This uses Java serialization, right? Can we use `MARSHALLED_TUPLE` mode for tuples instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Fix NPE on Tuple deserialization [ignite-3]
Posted by "valepakh (via GitHub)" <gi...@apache.org>.
valepakh commented on code in PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815#discussion_r1866136490
##########
modules/api/src/main/java/org/apache/ignite/table/TupleImpl.java:
##########
@@ -358,6 +360,17 @@ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassN
}
}
+ /**
+ * Serializes an object. Required to be implemented in pair with the {@link #readObject(ObjectInputStream)} so that the
+ * {@code StructuredObjectMarshaller#fillStructuredObjectLayerFrom} will actually call the {@link #readObject(ObjectInputStream)}.
+ *
+ * @param out Output object stream.
+ * @throws IOException If failed.
+ */
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
Review Comment:
> > Do you mean TupleWithSchemaMarshalling?
>
> Yes. We should prefer formats that can be used by non-Java clients as well.
I don't really understand why - it's used only in inter-node communications and I don't want to change it in this ticket - this is simply a bug fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Fix NPE on Tuple deserialization [ignite-3]
Posted by "valepakh (via GitHub)" <gi...@apache.org>.
valepakh commented on code in PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815#discussion_r1866120560
##########
modules/api/src/main/java/org/apache/ignite/table/TupleImpl.java:
##########
@@ -358,6 +360,17 @@ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassN
}
}
+ /**
+ * Serializes an object. Required to be implemented in pair with the {@link #readObject(ObjectInputStream)} so that the
+ * {@code StructuredObjectMarshaller#fillStructuredObjectLayerFrom} will actually call the {@link #readObject(ObjectInputStream)}.
+ *
+ * @param out Output object stream.
+ * @throws IOException If failed.
+ */
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
Review Comment:
> This uses Java serialization, right?
More accurately - this is an implementation of the Java serialization since the `Tuple` is serializable.
> Can we use `MARSHALLED_TUPLE` mode for tuples instead?
Do you mean `TupleWithSchemaMarshalling`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Fix NPE on Tuple deserialization [ignite-3]
Posted by "valepakh (via GitHub)" <gi...@apache.org>.
valepakh commented on code in PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815#discussion_r1869766108
##########
modules/api/src/main/java/org/apache/ignite/table/TupleImpl.java:
##########
@@ -358,6 +360,17 @@ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassN
}
}
+ /**
+ * Serializes an object. Required to be implemented in pair with the {@link #readObject(ObjectInputStream)} so that the
+ * {@code StructuredObjectMarshaller#fillStructuredObjectLayerFrom} will actually call the {@link #readObject(ObjectInputStream)}.
+ *
+ * @param out Output object stream.
+ * @throws IOException If failed.
+ */
+ private void writeObject(ObjectOutputStream out) throws IOException {
+ out.defaultWriteObject();
Review Comment:
> What happens if I run the reproducer in the ticket using the client API?
The `ItThinClientTupleComputeMarshallingTest#tupleFromTableReturned` is such a test, and it required some more fixing in the user objects serialization to make it work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-23818 Fix NPE on Tuple deserialization [ignite-3]
Posted by "valepakh (via GitHub)" <gi...@apache.org>.
valepakh commented on PR #4815:
URL: https://github.com/apache/ignite-3/pull/4815#issuecomment-2517811599
Changes related to the marshalling are split to the separate PR https://github.com/apache/ignite-3/pull/4833
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org