Some code was merged without being fmt-compliant. This
PR runs `go fmt ./...` and adds a test to github workflows
to verify that pull requests are fmt-compliant.
corpus.AppendPermanodeAttrValues and corpus.PermanodeAttrValue now take
a GPG key ID as their signer filter attribute, instead of a blob Ref.
Fix search package accordingly.
Fixes#1069
Change-Id: I0ef519fc16cf357adb84c32fa6e5bf92d8a0de26
Follow-up of ec66bcc871
I had run the pkg/search tests to see if no high-level search was
broken, for forgot about pkg/index itself, whoops.
Change-Id: Iec3aa28aca82ac6773983ea9df9ade26a48fc4a7
Remove the blob.SHA{1,224}From{Bytes,String} constructors too. No
longer used. This adds blob.RefFromBytes which was missing. We had
blob.RefFromString. Now everything uses blob.RefFrom* instead of
specifying a hash function.
Some tests set a flag to force use of SHA-1 because there was too much
golden data to update. We can remove those one-by-one over time as we
fix up tests.
Updates #537
Change-Id: Ibe6428089a6221594c2b751f53f98b03b5a28dc2
Part of the project renaming, issue #981.
After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.
This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.
Also, this only moves the lru package to internal. More will move to
internal later.
Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.
This updates some docs, but not all.
devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).
Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
Avoid select overhead in hot paths. Just use funcs.
Also, for sort-by-map searches, don't do a describe and pass over all
the results doing location lookups a second time. Remember the
location from the initial matching. Cache it on the search value.
Reduces some sort-by-map searches from 10 seconds to 3 seconds for
me. (still too slow, but good start)
Change-Id: I632954738df9accd802f28364ed11e48ddba0d14
Keep attributes for each signer in PermanodeMeta
to make Corpus methods AppendPermanodeAttrValues,
PermanodeAttrValue perform well even with a signerFilter.
Also add index/util_test.go to the notAnIndexer slice
of index/index_test.go.
Fixes#861
Change-Id: Ic25470b7d42e40a6f9d0ed0bf868ef3755413289
As rev e93e4f3822 moved the responsibility
of locking the corpus to a higher up locking of the index, some tests
now need to add some locking of their own to avoid data races.
Context: issue #750
Change-Id: Ifaf87e275432fe5e66639fae2699d27b566c93aa
The describe requests were launching a storm of RLocks which weren't
safe in the presence of goroutines trying to acquire write locks.
Instead, make the corpus locking the responsibility of the caller and
add Lock/Unlock/RLock/RUnlock methods to the index and move locking up
a level.
This also adds a fair bit of context.Context plumbing which was used
in earlier debugging.
Fixescamlistore/camlistore#709
Change-Id: I8d7254d1e1da541f8c080d62f5408aac807fd3b1
Most of it replaced with vendor/go4.org/types and
vendor/go4.org/readerutil
u32 went where needed in pkg/blobserver/*
invertedBool went in pkg/types/serverconfig
atomics64 went in pkg/fs
Change-Id: I230426cda35be4b45ed67e869f14e6fdae89be22
- add an Attrs map to PermanodeMap that is kept in sync with Claims
- update Attrs map on scanFromStorage and whenever a new blobRef is added
- add fast path to AppendPermanodeAttrValues(Locked),
PermanodeAttrValueLocked and PermanodeHasAttrValueLocked
- fix bugs in and add tests for PermanodeHasAttrValueLocked and
PermanodeAttrValueLocked slow path
Change-Id: Ib0dcdcf9355dd5fa8588c872721a029ec114cb6b