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(storage): array cursor iterator should return stats of all observed cursors #15731

Merged
merged 4 commits into from
Nov 5, 2019

Conversation

GeorgeMac
Copy link
Contributor

@GeorgeMac GeorgeMac commented Nov 4, 2019

Closes #15732

  1. Adds a failing test which demonstrates the incorrect reporting of stats from the arrayCursorIterator.Stats() method.
  2. Updates arrayCursorIterator.Stats() to accumulate all the cursor field stats values into a single response.

@stuartcarnie showed me that the builldXArrayCursor methods actually retain previously read stats and accumlate them on calls to reset which is how all read stats are accumulated in the end.

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

@GeorgeMac GeorgeMac requested review from benbjohnson, e-dard and stuartcarnie and removed request for benbjohnson November 4, 2019 15:04
@GeorgeMac
Copy link
Contributor Author

I just ran this with our signed integer test and it failed.
So I think perhaps the accumulation of all cursors was the desired effect. I will dig further into this assumption.

Copy link
Contributor

@stuartcarnie stuartcarnie left a comment

Choose a reason for hiding this comment

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

Great stuff, @GeorgeMac – thanks for uncovering and fixing!

@stuartcarnie stuartcarnie changed the title fix(storage): array cursor iterator should return stats of current iterator fix(storage): array cursor iterator should return stats of all observed cursors Nov 4, 2019
@GeorgeMac
Copy link
Contributor Author

Cheers @stuartcarnie and @benbjohnson 👍

@GeorgeMac GeorgeMac merged commit 3804d50 into master Nov 5, 2019
@GeorgeMac GeorgeMac deleted the gm/fix-array-cursor-iterator branch November 5, 2019 09:41
Copy link
Contributor

@e-dard e-dard left a comment

Choose a reason for hiding this comment

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

Thanks @GeorgeMac. We were lucky to uncover this bug!

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.

TSM arrayCursorIterator some cursors statistics are getting excluded from Stats()
4 participants