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

Add debug logs in PinotTripleVisibilityManager for response comparator testing #5631

Merged
merged 7 commits into from
Jan 28, 2024

Conversation

bowenxia
Copy link
Contributor

What changed?
Added debugging logs to PinotTripleVisibilityManager, for testing pinot response comparator

Why?
Without the logs, we can't know which database Cadence chooses.

How did you test it?

Potential risks

Release notes

Documentation Changes

@neil-xie
Copy link
Member

neil-xie commented Jan 26, 2024

This method can be moved into chooseVisibilityManagerForRead() so we don't need to do it twice. If it has override, we choose based on the override value, if not, use the original logic.

@neil-xie
Copy link
Member

The title needs to be updated, we need it for release

@bowenxia bowenxia changed the title Xbowen pinot response comparator test0 Add debug logs in PinotTripleVisibilityManager for response comparatoe testing Jan 26, 2024
@coveralls
Copy link

coveralls commented Jan 26, 2024

Pull Request Test Coverage Report for Build 018d4870-0bf2-483d-8719-fdd4045586fd

  • -21 of 21 (0.0%) changed or added relevant lines in 1 file are covered.
  • 76 unchanged lines in 16 files lost coverage.
  • Overall coverage increased (+0.03%) to 62.688%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/persistence/pinotVisibilityTripleManager.go 0 21 0.0%
Files with Coverage Reduction New Missed Lines %
common/persistence/sql/common.go 2 72.73%
common/persistence/sql/sqlplugin/mysql/db.go 2 83.33%
common/persistence/sql/sqlplugin/mysql/task.go 2 73.68%
common/task/fifo_task_scheduler.go 2 84.54%
service/history/execution/mutable_state_builder.go 2 68.64%
service/history/execution/mutable_state_util.go 2 37.63%
service/matching/db.go 2 73.23%
service/matching/taskListManager.go 2 79.7%
common/log/tag/tags.go 3 49.91%
service/history/task/fetcher.go 4 85.05%
Totals Coverage Status
Change from base Build 018d4849-4421-45b1-8f6a-c35b455095a4: 0.03%
Covered Lines: 92231
Relevant Lines: 147128

💛 - Coveralls

if override := ctx.Value(ContextKey); override == Primary {
manager = v.esVisibilityManager
v.logger.Debug("primary was chosen")
Copy link
Member

Choose a reason for hiding this comment

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

let's change the message here to make it more reasonable to others, like primary visibility manager elasticsearch was chosen for read

return manager.CountWorkflowExecutions(ctx, request)
}
v.logger.Debug("Pinot Migration log: ContextKey was empty.")
// temporary code: ends here <--
Copy link
Member

Choose a reason for hiding this comment

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

probably better to just link to a task ID or a todo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created a Jira ticket to record this.

@bowenxia bowenxia changed the title Add debug logs in PinotTripleVisibilityManager for response comparatoe testing Add debug logs in PinotTripleVisibilityManager for response comparator testing Jan 28, 2024
@bowenxia bowenxia merged commit 7ac5a84 into master Jan 28, 2024
16 checks passed
@bowenxia bowenxia deleted the xbowen_pinotResponseComparator_test0 branch January 28, 2024 20:53
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.

4 participants