Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection log timestamp contains negative msecs #892

Closed
ihsandemir opened this issue Jun 24, 2021 · 1 comment · Fixed by #893
Closed

Connection log timestamp contains negative msecs #892

ihsandemir opened this issue Jun 24, 2021 · 1 comment · Fixed by #893
Assignees
Labels
Source: Community to-jira Use to create a placeholder Jira issue in Jira APIs Project Type: Defect
Milestone

Comments

@ihsandemir
Copy link
Collaborator

ihsandemir commented Jun 24, 2021

@ihsandemir Hi - I'll test that tomorrow. Also - in the last read / last write time area - I got an odd log from the library with a negative millisecond timestamp - see "lastReadTime=2021-06-23 15:35:58.-67" in the log below.

2021/06/23-15:35:58.768856 +0000: (90): INFO: Discovery: Library - <hz.client_1><soaktest> ClientConnection{alive=0, connectionId=5, remoteEndpoint=Address[10.42.4.229:5701], lastReadTime=2021-06-23 15:35:58.-67, closedTime=2021-06-23 15:35:58.000, connected server version=4.0.3} closed. Reason: Socket read error. asio.misc:2 for ClientConnection{alive=1, connectionId=5, remoteEndpoint=Address[10.42.4.229:5701], lastReadTime=2021-06-23 15:35:58.-67, closedTime=never, connected server version=4.0.3}
.0.3}

Originally posted by @andysCaplin in #883 (comment)

This seems to happen if the timestamp is before the current time in the system.

@ihsandemir ihsandemir self-assigned this Jun 24, 2021
@ihsandemir ihsandemir added this to the 4.1.2 milestone Jun 24, 2021
@ihsandemir ihsandemir added Source: Community to-jira Use to create a placeholder Jira issue in Jira APIs Project labels Jun 24, 2021
@andysCaplin
Copy link

@ihsandemir I rebuilt my application with the new library and I'm not getting the disconnects any more.

Could I ask you a question about client-server interaction ?

We have a setup where we have multiple servers ( Java 4.0 ) and one client. ( C++ 4.0 ) Say Server1, Server2, Server3 and Client1
Everything is started and connected.

If we break the network connection between Server1 and Client1 we get what looks like inconsistent behaviour

  • Client1 sees a socket error but does not get a CLIENT_DISCONNECTED lifecycle event - which seems correct because we have other servers available
  • Server1 gets a CLIENT_DISCONNECTED lifecycle event for the Client1
  • If we stop Server2 and Server3 then Client1 will get a CLIENT_DISCONNECTED lifecycle event.

Is that correct ?
And if so, how do we distinguish at the server level the difference between a client disconnecting from a server and if we stop it completely ?
Do we need to have some reference counting scheme at the server ?

ihsandemir added a commit to ihsandemir/hazelcast-cpp-client that referenced this issue Jun 25, 2021
ihsandemir added a commit to ihsandemir/hazelcast-cpp-client that referenced this issue Aug 2, 2021
ihsandemir added a commit that referenced this issue Aug 2, 2021
…#893)

* Fixed the time printing for `Connection` logs so that the msecs part is correctly written.

fixes #892
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Community to-jira Use to create a placeholder Jira issue in Jira APIs Project Type: Defect
Projects
None yet
2 participants