Project

General

Profile

Actions

Feature #7200

closed

[Keep] keepproxy supports "index" API

Added by Tom Clegg over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
Keep
Target version:
Story points:
1.0

Description

The response should follow the same API as keepstore's own index handler. In keepproxy terms this means:
  • Unless a complete index is retrieved for every service (i.e., http 200 and terminated by a single blank line), the index is incomplete, and keepproxy's response must not end with a blank line.
  • If a block appears 2x in each of N keepstore "index" responses, it appears 2N times in keepproxy's response, too.
  • If the index is complete, it must end with a single blank line.
  • The index is given in whatever order is convenient for keepproxy (the caller does not expect it to be sorted).

Implementation

New public function in sdk/go/keepclient:

// GetIndex retrieves a list of blocks stored on the given server whose hashes
// begin with the given prefix. The returned reader will return an error (other
// than EOF) if the complete index cannot be retrieved. This should only be
// expected to return useful results if the client is using a "data manager token" 
// recognized by the Keep services.
func (kc *KeepClient) GetIndex(keepServiceUUID, prefix string) (io.Reader, error) {
...
}

Tests for this function must include "caller sees error if partial index is retrieved from keepstore" (i.e., no blank line before EOF).

Some of the existing code in Data Manager may be useful here. (Data Manager might also deserve to be updated to use this new SDK feature instead of having duplicate code, but this might wait for a separate branch/story.)


Subtasks 1 (0 open1 closed)

Task #7390: Review branch 7200-keepproxy-index-apiResolvedTom Clegg09/28/2015Actions

Related issues

Blocks Arvados - Bug #7167: [Deployment] Write an efficient Keep migration scriptResolvedRadhika Chippada09/30/2015Actions
Actions

Also available in: Atom PDF