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

Wrong JSON path is used to check DB lock status while switching DR clusters #6231

Closed
leonliao opened this issue Jan 11, 2022 · 0 comments
Closed

Comments

@leonliao
Copy link
Contributor

According to release notes of 6.3.9, the status json output for database lock status has been updated.

Replaced cluster.database_locked status field with cluster.database_lock_state, which contains two subfields: locked (boolean) and lock_uid (which contains the database lock uid if the database is locked). (PR #2058)

But the code to check DB lock status is still using old JSON path.

bool getLockedStatus(StatusObjectReader statusObj) {
	try {
		StatusObjectReader statusObjCluster = statusObj["cluster"].get_obj();
		return statusObjCluster["database_locked"].get_bool();
	} catch (std::runtime_error& e) {
		TraceEvent(SevWarn, "DBA_GetLockedStatusFail").detail("Error", e.what());
		throw backup_error();
	}
}

This is causing errors while switching over.

<Event Severity="20" Time="1641869341.175349" DateTime="2022-01-11T02:49:01Z" Type="DBA_GetLockedStatusFail" ID="0000000000000000" Error="JSON path doesn't exist" ThreadID="886029773038070683" Machine="127.0.0.1:8661" LogGroup="default" />

Will submit a PR to solve it.

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

No branches or pull requests

2 participants