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

getty reopen sesion #239

Closed
wants to merge 2 commits into from
Closed

Conversation

kaori-seasons
Copy link
Contributor

@kaori-seasons kaori-seasons commented Aug 23, 2022

What this PR does:
Related to issue-128
If getty is disconnected and reconnected, the port of getty will change. It will cause tc to not find the previously registered rm service, so we need to turn off the heartbeat, and tc will not be able to find rm

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

run samples/tcc or local


@@ -113,8 +113,6 @@ func (g *gettyClientHandler) OnMessage(session getty.Session, pkg interface{}) {
}

func (g *gettyClientHandler) OnCron(session getty.Session) {
log.Debug("session{%s} Oncron executing", session.Stat())
g.transferBeatHeart(session, message.HeartBeatMessagePing)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why remove heartbeat?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope to delay the interval between transaction submissions by means of timers in the code. The heartbeat may cause getty to disconnect and reconnect, and the time is uncontrollable.

Copy link
Contributor Author

@kaori-seasons kaori-seasons Aug 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should register the branch transaction in listener#onOpen before the session is reopened

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope to delay the interval between transaction submissions by means of timers in the code. The heartbeat may cause getty to disconnect and reconnect, and the time is uncontrollable.

If the heartbeat is closed, it may cause getty to disconnect and reconnect

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should register the branch transaction in listener#onOpen before the session is reopened

you mean register resource on Open?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I want to call GetResourceManager().branchRegister before registering the resource

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I want to call GetResourceManager().branchRegister before registering the resource

I don't know if I understand it right or not, in my understanding, branch transaction is regietered when a branch rpc is called, so what are you trying to say here is register resource when it's Open ?

@AlexStocks
Copy link
Contributor

pls fix the ci failure.

@106umao
Copy link
Contributor

106umao commented Sep 15, 2022

pls fix the ci failure.

this ci have fixed by #263

106umao
106umao previously approved these changes Sep 15, 2022
@106umao 106umao dismissed their stale review September 15, 2022 14:58

have still some problems

@luky116 luky116 closed this Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants