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

Fix a problem caused by missing state (release-7.1). #7478

Merged
merged 1 commit into from Jun 28, 2022

Conversation

RenxuanW
Copy link
Contributor

@RenxuanW RenxuanW commented Jun 28, 2022

PR on main: #7479.

Without state, the code compiles to

if (coordinator->get().get().hostname.present())
{
	Hostname h = coordinator->get().get().hostname.get();
	StrictFuture<Void> __when_expr_1 = store(coordinatorAddress, h.resolveWithRetry());
	if (static_cast<GetClusterProtocolImplActor*>(this)->actor_wait_state < 0) return a_body1Catch1(actor_cancelled(), std::max(0, loopDepth - 1));
	if (__when_expr_1.isReady()) {
		if (__when_expr_1.isError()) return a_body1Catch1(__when_expr_1.getError(), std::max(0, loopDepth - 1));
		else return a_body1loopBody1when2(__when_expr_1.get(), loopDepth);
	};
	static_cast<GetClusterProtocolImplActor*>(this)->actor_wait_state = 2;"
	__when_expr_1.addCallbackAndClear(static_cast<ActorCallback< GetClusterProtocolImplActor, 1, Void >*>(static_cast<GetClusterProtocolImplActor*>(this)));
	loopDepth = 0;
}

Hostname h is destructed before the callback function is run, thus the resolved address can be unpredictible, sometimes has tls and can cause connection failures and further errors in k8s tests.

Code-Reviewer Section

The general guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

  • The PR has a description, explaining both the problem and the solution.
  • The description mentions which forms of testing were done and the testing seems reasonable.
  • Every function/class/actor that was touched is reasonably well documented.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

  • This change/bugfix is a cherry-pick from the next younger branch (younger release-branch or main if this is the youngest branch)
  • There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)

@RenxuanW RenxuanW marked this pull request as ready for review June 28, 2022 02:07
Copy link
Contributor

@halfprice halfprice left a comment

Choose a reason for hiding this comment

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

Nice find!

Make sure this is in main branch as well.

@RenxuanW RenxuanW changed the title Fix a problem caused by missing state. Fix a problem caused by missing state (release-7.1). Jun 28, 2022
@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-macos on macOS BigSur 11.5.2

  • Commit ID: 4c0b40f
  • Duration 0:33:36
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr-cluster-tests on Linux CentOS 7

  • Commit ID: 4c0b40f
  • Duration 0:40:31
  • Result: ❌ FAILED
  • Error: Error while executing command: tar -czf "${CODEBUILD_SRC_DIR}/packaging/docker/website/${FDB_VERSION}/fdb_${FDB_VERSION}.tar.gz" --directory "${CODEBUILD_SRC_DIR}/packaging/docker/website/${FDB_VERSION} .. Reason: exit status 2
  • Build Logs (available for 30 days)

@fdb-windows-ci
Copy link
Collaborator

Doxense CI Report for Windows 10

@foundationdb-ci
Copy link
Contributor

Result of foundationdb-pr on Linux CentOS 7

  • Commit ID: 4c0b40f
  • Duration 1:03:32
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

@jzhou77 jzhou77 merged commit d8ce8aa into apple:release-7.1 Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants