Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Async index creation is not working #857

Closed
carlosms opened this issue Oct 24, 2019 · 0 comments · Fixed by #859
Closed

Async index creation is not working #857

carlosms opened this issue Oct 24, 2019 · 0 comments · Fixed by #859
Assignees
Labels
bug Something isn't working

Comments

@carlosms
Copy link
Contributor

Trying to use async index in gitbase (current master, and v0.24.0-rc3), it fails:

mysql> CREATE INDEX commits_hash_idx ON commits USING pilosa (commit_hash);
Query OK, 0 rows affected (0.01 sec)

mysql> EXPLAIN FORMAT=TREE select repository_id from commits where commit_hash <> 'nope';
+-----------------------------------------------------------------------+
| plan                                                                  |
+-----------------------------------------------------------------------+
| Exchange(parallelism=8)                                               |
|  └─ Project(commits.repository_id)                                    |
|      └─ Table(commits)                                                |
|          ├─ Column(repository_id, TEXT, nullable=false)               |
|          ├─ Column(commit_hash, VARCHAR, nullable=false)              |
|          ├─ Column(commit_author_name, TEXT, nullable=false)          |
|          ├─ Column(commit_author_email, VARCHAR, nullable=false)      |
|          ├─ Column(commit_author_when, TIMESTAMP, nullable=false)     |
|          ├─ Column(committer_name, TEXT, nullable=false)              |
|          ├─ Column(committer_email, VARCHAR, nullable=false)          |
|          ├─ Column(committer_when, TIMESTAMP, nullable=false)         |
|          ├─ Column(commit_message, TEXT, nullable=false)              |
|          ├─ Column(tree_hash, VARCHAR, nullable=false)                |
|          ├─ Column(commit_parents, JSON, nullable=false)              |
|          ├─ Filters                                                   |
|          │   └─ NOT(commits.commit_hash = "nope")                     |
|          └─ Indexes                                                   |
|              └─ commits_hash_idx                                      |
+-----------------------------------------------------------------------+
18 rows in set (0.00 sec)

mysql> select commit_hash from commits where commit_hash <> 'nope';
ERROR 1105 (HY000): unknown error: on repository "octoprint-tft": mapping not found for partition: 6f63746f7072696e742d746674

The logs look normal:

DEBU[0009] executing query                               query="CREATE INDEX commits_hash_idx ON commits USING pilosa (commit_hash)"
INFO[0009] audit trail                                   action=authorization address="127.0.0.1:41316" connection_id=1 permission="read, write" pid=6 query="CREATE INDEX commits_hash_idx ON commits USING pilosa (commit_hash)" success=true system=audit user=root
INFO[0009] starting to save the index                    async=true driver=pilosa id=commits_hash_idx
INFO[0009] audit trail                                   action=query address="127.0.0.1:41316" connection_id=1 duration=3.866551ms pid=6 query="CREATE INDEX commits_hash_idx ON commits USING pilosa (commit_hash)" success=true system=audit user=root
INFO[0009] index successfully created                    driver=pilosa id=commits_hash_idx

The query works adding WITH (async = false) to the index creation query.

It works fine for gitbase v0.23.1

@carlosms carlosms added the bug Something isn't working label Oct 24, 2019
@carlosms carlosms self-assigned this Oct 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant