Skip to content

Conversation

@ajbeamon
Copy link
Contributor

The consistency check tries to validate that our shard size estimate is sufficiently close to the actual size. It does this by computing a variance based on the sampling properties and checking for large differences relative to the standard deviation.

It attempts to avoid performing this check when there are not enough samples by requiring at least 30 keys in the sample. However, it is possible that almost all of your samples could come from keys with large values, which are included unconditionally. That means that they have no effect on this computed variance or the difference between the estimated and actual size of the shard.

Therefore, this check hinges on the properties of the keys that are included conditionally, but there was no check to make sure we had enough of them. This PR changes the check to require 30 keys in the sample that are not unconditional inclusions.

@alecgrieser alecgrieser merged commit b8e6338 into apple:release-6.1 Apr 17, 2019
@ajbeamon ajbeamon deleted the fix-consistency-check-shard-estimate-validation branch May 13, 2019 21:17
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.

2 participants