Set IsDelta for Zoekt based on ForceReindex
What does this MR do and why?
Closes #30 (closed)
- move setting the gitaly fromHash to the
initClient
method - use
i.ForceReindex
to setIsDelta
when sending to Zoekt - update integration test
How to set up and validate locally
i tested in gdk using a large-ish repository (gitlab-hq
) that is enabled for Zoekt by using make gdk
from the zoekt project
- grab project (works if you have 1 project named
gitlab-hq
)
p = Project.find_by_path('gitlab-hq')
- for me the project id is 37. use that to note how many index files there are, if there are not more than 1 (and no meta files), you must create new commits in the GDK UI
➜ ls -lah $GDK_DIR/zoekt-data/development/index/37*
-rw-r--r-- 1 terrichu staff 213M Jan 19 13:55 /Users/terrichu/projects/gitlab-development-kit/zoekt-data/development/index/37_v16.00000.zoekt
-rw-r--r-- 1 terrichu staff 445B Jan 19 13:58 /Users/terrichu/projects/gitlab-development-kit/zoekt-data/development/index/37_v16.00000.zoekt.meta
-rw-r--r-- 1 terrichu staff 1.7K Jan 19 13:56 /Users/terrichu/projects/gitlab-development-kit/zoekt-data/development/index/37_v16.00001.zoekt
-rw-r--r-- 1 terrichu staff 418B Jan 19 13:58 /Users/terrichu/projects/gitlab-development-kit/zoekt-data/development/index/37_v16.00001.zoekt.meta
-rw-r--r-- 1 terrichu staff 1.6K Jan 19 13:58 /Users/terrichu/projects/gitlab-development-kit/zoekt-data/development/index/37_v16.00002.zoekt
- force reindex and verify you have only one shard file (and zero meta files)
p.repository.update_zoekt_index!(force: true)
➜ ls -lah $GDK_DIR/zoekt-data/development/index/37*
-rw-r--r-- 1 terrichu staff 213M Jan 19 14:03 /Users/terrichu/projects/gitlab-development-kit/zoekt-data/development/index/37_v16.00000.zoekt
Edited by Terri Chu