alamar commented on a change in pull request #8577:
URL: https://github.com/apache/ignite/pull/8577#discussion_r548872849
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/direct/stream/v2/DirectByteBufferStreamImplV2.java
##########
@@ -584,7 +587,17 @@ public DirectByteBufferStreamImplV2(MessageFactory
msgFactory) {
/** {@inheritDoc} */
@Override public void writeString(String val) {
- writeByteArray(val != null ? val.getBytes() : null);
+ if (val != null) {
+ if (byteArr == null)
+ byteArr = val.getBytes();
+
+ writeByteArray(byteArr);
+
+ if (lastFinished)
+ byteArr = null;
+ }
+ else
+ writeByteArray(null);
Review comment:
Actually, we need to reset it to null if lastFinished. Need to figure
out the logic, maybe it's too cumbersome and confusing to implement.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]