[
https://issues.apache.org/jira/browse/GEODE-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094405#comment-17094405
]
ASF GitHub Bot commented on GEODE-7944:
---------------------------------------
jvarenina commented on a change in pull request #593:
URL: https://github.com/apache/geode-native/pull/593#discussion_r416531456
##########
File path: cppcache/src/QueueConnectionRequest.cpp
##########
@@ -28,10 +28,10 @@ void QueueConnectionRequest::toData(DataOutput& output)
const {
output.writeString(m_serverGp);
output.write(static_cast<int8_t>(DSCode::FixedIDByte));
output.write(static_cast<int8_t>(DSCode::ClientProxyMembershipId));
- uint32_t buffLen = 0;
- output.writeBytes(reinterpret_cast<uint8_t*>(const_cast<char*>(
- m_membershipID.getDSMemberId(buffLen))),
- buffLen);
+ uint32_t memIdBufferLength = 0;
+ auto memIdBuffer = m_membershipID.getDSMemberId(memIdBufferLength);
Review comment:
Related to writeBytes, I tested this manually to see that everything is
de-serialized correctly on locator side.
Also, on two other places in native client the writeBytes is used to
serialize ClientProxyMebershipID
when sent in handshake message towards servers.
When created and serialized in client:
[info 2020/04/21 12:50:19.371347 CEST jakov:14391 140683540789248] Using
Native_bfbgddgaaf14391 as random data for ClientProxyMembershipID
[debug 2020/04/21 12:50:19.378174 CEST jakov:14391 140683540789248]
GethashKey :0:0:0:0:0:default_GeodeDS:Native_bfbgddgaaf14391 client id:
jakov(14391:loner):2:Native_bfbgddgaaf14391:default_GeodeDS
When de-serialized in locator and printed with toString:
Locator received request QueueConnectionRequest{group=, excluded=[],
redundant=
-1,findDurable=false,proxyId=identity(0.0.0.0(default_GeodeDS:14391:loner):2:Native_bfbgddgaaf14391:default_GeodeDS,connection=1,durableAttributes=DurableClientAttributes[id=31_gem_pool;
timeout=300])}
When de-serialized in servers and printed with toString:
Initializing proxy:
CacheClientProxy[identity(0.0.0.0(default_GeodeDS:14391:loner):2:Native_bfbgddgaaf14391:default_GeodeDS,connection=1,durableAttributes=DurableClientAttributes[id=31_gem_pool;
timeout=300]); port=34308; primary=true; version=GFE 9.0]
----------------------------------------------------------------
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]
> Unable to deserialize membership id java.io.EOFException on locator only when
> debug is enabled and native client is used
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-7944
> URL: https://issues.apache.org/jira/browse/GEODE-7944
> Project: Geode
> Issue Type: Bug
> Components: native client
> Reporter: Jakov Varenina
> Assignee: Jakov Varenina
> Priority: Major
> Attachments: locator.log, native_client.log
>
>
> During the creation of pool in geode native with subscription "enabled"
> exception java.io.EOFException is thrown on locator only when it is
> configured with _--log-level=debug_. On geode native this reflects with "No
> locators available". You can find native_client.log and locator.log in
> attachment.
> Native client code:
> {code:java}
> auto cache = cacheFactory.create();
> auto poolFactory = cache.getPoolManager().createFactory();
> auto pool = poolFactory.addLocator("localhost", 10334)
> .setSubscriptionEnabled(true)
> .create("pool");
> {code}
> With java client everything works OK.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)