Commit 026ef4c9 authored by ale's avatar ale
Browse files

Ignore app_key in the aux-db results when demuxing responses

parent 7443b86a
Pipeline #13095 passed with stages
in 1 minute and 36 seconds
......@@ -185,8 +185,13 @@ func (tx *wdbTX) lookup(ctx context.Context, lookups []*lookupEntry) {
close(ch)
}()
// We might receive multiple entries for the same lookup key:
// they will have different AppKeys. To lookup the callback,
// we ignore the AppKey part of the key.
for entry := range ch {
cb, ok := callbacks[entry.Key.String()]
lookupKey := entry.Key
lookupKey.AppKey = ""
cb, ok := callbacks[lookupKey.String()]
if !ok {
// Violation of the aux-db Get API contract.
log.Printf("unexpected aux-db entry %s", entry.Key.String())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment