-
Notifications
You must be signed in to change notification settings - Fork 109
sql/index/pilosa: parallelize index creation #644
sql/index/pilosa: parallelize index creation #644
Conversation
Looks that we enumerate columns per partition as well (they are not global anymore), so it does't make sense to merge bitmaps across partitions. Am I right? |
I'm trying to think if following scenario is possible: You have 2 partitions. instead of so after Is it possible? |
As far as I can see there are already tests using ANDs and ORs https://github.com/src-d/go-mysql-server/blob/master/engine_test.go#L1665-L1726 and tests use partitioned tables https://github.com/src-d/go-mysql-server/blob/master/engine_test.go#L1508-L1511, so I assume that if tests pass, it should work 🤷♂️ |
I've tried this with gitbase and all tests that use indexes still work. Also tried manually and they output the exact same results. |
I tested this PR against following repos:
Generally I think we have something broken in current implementation of indexes because for following query: SELECT count(*) FROM commits WHERE commit_author_email!='sjdflkjsdlfkj'; I get With your implementation both results are OK! CREATE INDEX email_idx ON commits USING pilosa (commit_author_email);
CREATE INDEX ref_idx ON refs USING pilosa (ref_name); I got:
If I do it slowly (create the first one, wait and create the next one, then everything looks fine). Another segfault I get when I create an index on expression: CREATE INDEX files_lang_idx ON files USING pilosa (language(file_path, blob_content));
The first one looks more like a race in pilosa structs (some file is not closed/open, so data didn't sync up.) The second one related to mapping. PTAL, if you can reproduce it or maybe it's just my messed up env. |
Pausing this until src-d/gitbase#769 is fixed (which is kind of related to this) |
First issue has been solved in gitbase, as it was not an index issue per se. The other issues have been solved by this last commit. Guarding of mapping transactions was not being done correctly. |
TODO: config for setting the number of threads for creating indexes |
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
6f2de86
to
a9e32d0
Compare
Done |
Closes #346