From bfafb8321fc6535fd9de48a2963083df0785e29b Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 18 Mar 2014 17:35:14 -0700 Subject: [PATCH] TODO: clean up sync+index incoming blob handling Change-Id: I64cd4818dead81f5a0dac0e275994df17b7740ef --- TODO | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/TODO b/TODO index d55a51f99..ffb9dd097 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,20 @@ There are two TODO lists. This file (good for airplanes) and the online bug trac Offline list: +-- stop using the "cond" blob router storage type in genconfig, as + well as the /bs-and-index/ "replica" storage type, and just let the + index register its own AddReceiveHook like the sync handler + (pkg/server/sync.go). But whereas the sync handler only synchronously + _enqueues_ the blob to replicate, the indexer should synchronously + do the ReceiveBlob (ooo-reindex) on it too before returning. + But the sync handler, despite technically only synchronously-enqueueing + and being therefore async, is still very fast. It's likely the + sync handler will therefore send a ReceiveBlob to the indexer + at the ~same time the indexer is already indexing it. So the indexer + should have some dup/merge suppression, and not do double work. + singleflight should work. The loser should still consume the + source io.Reader body and reply with the same error value. + -- ditch the importer.Interrupt type and pass along a context.Context instead, which has its Done channel for cancelation.