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

PMM-12805 Collstats, indexstats iterate only over collections, not views. #790

Merged
merged 25 commits into from
Feb 9, 2024

Conversation

JiriCtvrtka
Copy link
Contributor

@JiriCtvrtka JiriCtvrtka commented Jan 31, 2024

exporter/common.go Outdated Show resolved Hide resolved
@percona percona deleted a comment from github-actions bot Jan 31, 2024
@JiriCtvrtka JiriCtvrtka marked this pull request as ready for review February 1, 2024 08:10
@JiriCtvrtka JiriCtvrtka requested a review from a team as a code owner February 1, 2024 08:10
exporter/common.go Outdated Show resolved Hide resolved
exporter/common.go Outdated Show resolved Hide resolved
exporter/collstats_collector.go Outdated Show resolved Hide resolved
exporter/common.go Outdated Show resolved Hide resolved
@JiriCtvrtka
Copy link
Contributor Author

JiriCtvrtka commented Feb 6, 2024

Summary after required changes:

  1. Func listCollectionsWithoutViews now returns map instead array.
  2. User's input collections will end up with error if any of provided collections is view.
  3. For autodiscovery it using only collections without views.
  4. Ivan was not sure if we need apply this fix even for indexstats. Since problem is with getting cursor for view I also applied this fix to indexstats too to prevent possible problems in future.

exporter/common.go Outdated Show resolved Hide resolved
@JiriCtvrtka
Copy link
Contributor Author

@ademidoff View could be part of namespace [database-name].[collection/view/index-name]

I did refactor (possibility to get collections with/without views) and together with this I changed naming to have it more clear. Please take a look once more.

@JiriCtvrtka JiriCtvrtka requested a review from ademidoff February 6, 2024 17:10
@JiriCtvrtka JiriCtvrtka changed the title PMM-12805 Collstats iterate only over collections, not views. PMM-12805 Collstats, indexstats iterate only over collections, not views. Feb 6, 2024
exporter/common_test.go Outdated Show resolved Hide resolved
@JiriCtvrtka JiriCtvrtka merged commit 6b436b6 into main Feb 9, 2024
9 checks passed
@JiriCtvrtka JiriCtvrtka deleted the PMM-12805-view-error branch February 9, 2024 11:52
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