-
Notifications
You must be signed in to change notification settings - Fork 123
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 count result for query with indexes #769
Comments
@erizocosmico - something is wrong with partition iterator (first thought), just for commits. For testing purpose, I rollbacked locally the commit files (commits, commit_files, commit_trees, commit_blobs) to the revision And now I get for both cases Can you take a look? |
I think this is actually a bug in the previous versions that we somehow just solved. This is with the old gitbase version: select count(*) from commits where repository_id = 'db600b30cdd2398d577eb827ce4fd3c1efa09bc1.siva' AND commit_hash = '5d24d5d884bbdd8e205c19e8d8c7d32bbdcf05fe';
As we can see, that commit is in that repo. But then, if we do this: SELECT COUNT(*) FROM (SELECT commit_hash, repository_id FROM commits WHERE commit_author_email!='sjdflkjsdlfkj') t WHERE repository_id = 'db600b30cdd2398d577eb827ce4fd3c1efa09bc1.siva' AND commit_hash = '5d24d5d884bbdd8e205c19e8d8c7d32bbdcf05fe';
We can see it's not. With the new implementation it shows up in both. So the fix is not to revert the walk commits lazily, but to actually fix whatever we're doing for indexing that comes out wrong. |
So the wrong count comes from indexes, the problem is in the iterator which is passed to the index driver, because actually it already iterates through the wrong number of commits. |
Repos:
Query:
Count result:
4344
Query with index:
Wrong count result:
4301
The text was updated successfully, but these errors were encountered: