Commit Graph

12 Commits

Author SHA1 Message Date
Brad Fitzpatrick a062b701c9 all: more log spam & logging consistency cleanup
Change-Id: Ibc38c2eed86e75afb064ba25ba586494c813f56c
2018-04-22 11:30:02 -07:00
Brad Fitzpatrick 194d4f9443 blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps
I had intended for this to be a small change.

I was going to just add context.Context to the BlobReceiver interface,
but then I saw blob.Fetcher could also use one, so I decided to do two
in one CL.

And then it got a bit infectious and ended up touching everything.

I ended up doing SubFetch in the process by necessity.

At a certain point I finally started using context.TODO() in a few
spots, but not too many. But removing context.TODO() will come in the
future. There are more blob storage interfaces lacking context, too,
like RemoveBlobs.

Updates #733

Change-Id: Idf273180b3f8e397ac5929c6d7f520ccc5cdce08
2018-01-18 16:22:16 -08:00
Paul Lindner 837fe8ac46 vendor: Update github.com/gorilla/websocket to v1.2.0
Maps to rev: gorilla/websocket@ea4d1f681b

Also adjust the search websocket code to use the new API
which does proper origin checks.

Changelog: https://github.com/gorilla/websocket/releases/tag/v1.2.0

Change-Id: Ie25490b6319a98345aa6272e9eabc35c298bc06d
2018-01-11 10:42:39 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
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
2018-01-01 16:03:34 -08:00
Brad Fitzpatrick 7d326336cf search: remove broken websocket status optimization.
It was breaking the websocket integration test. We still need to
compute the last status message even if nobody is currently connected,
because when a websocket connection does arrive, we need to send the
last commputed status message.

Change-Id: Icea0fcc69941aa6249d32f0a4ef4ec03bdfb1e20
2016-04-26 09:29:39 -07:00
Brad Fitzpatrick 359ac93fed importer: cache accounts list
Fixes non-stop queries burning CPU in the background.

Fixes #519

Change-Id: I16d7e6d83735acd8e2f96045a9d84dfe06207348
2016-04-22 16:00:25 -07:00
Brad Fitzpatrick 75d60962f6 Move remaining stuff in third_party/* to vendor/*
Change-Id: Ifbcc02817083cba68d8c1acec3e6ec50e8f61149
2016-04-20 16:49:15 -07:00
Brad Fitzpatrick c36a3a087e pkg/search: don't run a speculative search more than once a time
When new blobs arrive we re-run open search queries (those requested
by an active websocket client) in case they changed, and then push the
new result to the browser if they did change.

But when uploading lots of data if the browser has a big search query
active, it was possible to start running the same query in many
goroutines over the same data. Don't do that.

Verified that this was the case with some temporary logging in the
already-refreshing case.

Updates camlistore/camlistore#519
2015-12-29 13:33:45 -08:00
Brad Fitzpatrick 5c2ad4eaae search: fix websocket crash
Fixes #563

Change-Id: Iff04e4a40406ddd391f3c8fc93dcfe0209806ee3
2015-01-19 09:29:19 -08:00
Brad Fitzpatrick 6517bbc392 Send system status JSON on websockets upon connect and when it changes.
Change-Id: Ic0f211611d63b9d519ee3c5da0dd96c6b77459d5
2014-08-29 14:12:02 -07:00
Brad Fitzpatrick ffc6c39d40 Live search results via WebSocket.
Works in the debug page now, but not wired up to the main UI.
Leaving that for Boodman.

Change-Id: I0d0acf78cbcd228e95e391d724ea43571d174511
2013-12-07 22:22:45 -08:00
Brad Fitzpatrick b2d221af44 Start of Camlistore WebSocket support, for showing live search queries in the UI.
If the JavaScript UI is open and the query you're looking at changes
due to new data arriving, the server should push the update search
results to you live, without needing to poll.

Change-Id: I00faf7737f9a459de39b21fb5226a8000feeee2b
2013-12-07 20:19:20 -08:00