Addressing Adam's comments in https://vanadium-review.googlesource.com/#/c/13619/
Change-Id: Ic5b4319685dec9c3ec7ddedf53109388039168b7
diff --git a/v23/services/syncbase/nosql/service.vdl b/v23/services/syncbase/nosql/service.vdl
index 5444f1e..ebeccf5 100644
--- a/v23/services/syncbase/nosql/service.vdl
+++ b/v23/services/syncbase/nosql/service.vdl
@@ -238,7 +238,10 @@
type BlobManager interface {
// API for resumable blob creation (append-only). After commit, a blob
// is immutable. Before commit, the BlobRef can be used with PutBlob,
- // GetBlobSize, DeleteBlob, and CommitBlob.
+ // GetBlobSize, DeleteBlob, and CommitBlob. After commit, PutBlob and
+ // CommitBlob can no longer be used. Blob creation can be resumed by
+ // obtaining the current blob size with GetBlobSize and appending to the
+ // blob via PutBlob.
//
// CreateBlob returns a BlobRef for a newly created blob.
CreateBlob() (br BlobRef | error) {access.Write}
@@ -276,16 +279,16 @@
// ranked blobs are more eagerly evicted.
KeepBlob(br BlobRef, rank uint64) error {access.Write}
- // TODO(hpucha): Add API for efficient blob cloning. Options include:
- // (1) CloneBlob RPC with an array of mods that sepcify the offset and
- // len for the new bytes. This might need two len fields to support
- // growing a blob in the middle instead of just replacing byte for byte
- // in the src blob. Or perhaps Offset>=0 to mean "read from old blob at
- // this offset for Length bytes", and Offset<0 to mean "read the next
- // Length Bytes from the PutBlob() stream". (2) We could adopt API
- // similar to the local blob store with BlockOrFile segments, giving a
- // more flexible way to clone blobs. Also provide support for parallel
- // blob upload.
+ // TODO(hpucha): Clarify how to pick priority and rank. Add API for
+ // efficient blob cloning. Options include: (1) CloneBlob RPC with an
+ // array of mods that specify the offset and len for the new bytes. This
+ // might need two len fields to support growing a blob in the middle
+ // instead of just replacing byte for byte in the src blob. Or perhaps
+ // Offset>=0 to mean "read from old blob at this offset for Length
+ // bytes", and Offset<0 to mean "read the next Length Bytes from the
+ // PutBlob() stream". (2) We could adopt API similar to the local blob
+ // store with BlockOrFile segments, giving a more flexible way to clone
+ // blobs. Also provide support for parallel blob upload.
}
// DatabaseWatcher allows a client to watch for updates in the database.
diff --git a/v23/services/syncbase/nosql/service.vdl.go b/v23/services/syncbase/nosql/service.vdl.go
index 639877f..2d3d4ba 100644
--- a/v23/services/syncbase/nosql/service.vdl.go
+++ b/v23/services/syncbase/nosql/service.vdl.go
@@ -603,7 +603,10 @@
type BlobManagerClientMethods interface {
// API for resumable blob creation (append-only). After commit, a blob
// is immutable. Before commit, the BlobRef can be used with PutBlob,
- // GetBlobSize, DeleteBlob, and CommitBlob.
+ // GetBlobSize, DeleteBlob, and CommitBlob. After commit, PutBlob and
+ // CommitBlob can no longer be used. Blob creation can be resumed by
+ // obtaining the current blob size with GetBlobSize and appending to the
+ // blob via PutBlob.
//
// CreateBlob returns a BlobRef for a newly created blob.
CreateBlob(*context.T, ...rpc.CallOpt) (br BlobRef, err error)
@@ -917,7 +920,10 @@
type BlobManagerServerMethods interface {
// API for resumable blob creation (append-only). After commit, a blob
// is immutable. Before commit, the BlobRef can be used with PutBlob,
- // GetBlobSize, DeleteBlob, and CommitBlob.
+ // GetBlobSize, DeleteBlob, and CommitBlob. After commit, PutBlob and
+ // CommitBlob can no longer be used. Blob creation can be resumed by
+ // obtaining the current blob size with GetBlobSize and appending to the
+ // blob via PutBlob.
//
// CreateBlob returns a BlobRef for a newly created blob.
CreateBlob(*context.T, rpc.ServerCall) (br BlobRef, err error)
@@ -954,7 +960,10 @@
type BlobManagerServerStubMethods interface {
// API for resumable blob creation (append-only). After commit, a blob
// is immutable. Before commit, the BlobRef can be used with PutBlob,
- // GetBlobSize, DeleteBlob, and CommitBlob.
+ // GetBlobSize, DeleteBlob, and CommitBlob. After commit, PutBlob and
+ // CommitBlob can no longer be used. Blob creation can be resumed by
+ // obtaining the current blob size with GetBlobSize and appending to the
+ // blob via PutBlob.
//
// CreateBlob returns a BlobRef for a newly created blob.
CreateBlob(*context.T, rpc.ServerCall) (br BlobRef, err error)
@@ -1072,7 +1081,7 @@
Methods: []rpc.MethodDesc{
{
Name: "CreateBlob",
- Doc: "// API for resumable blob creation (append-only). After commit, a blob\n// is immutable. Before commit, the BlobRef can be used with PutBlob,\n// GetBlobSize, DeleteBlob, and CommitBlob.\n//\n// CreateBlob returns a BlobRef for a newly created blob.",
+ Doc: "// API for resumable blob creation (append-only). After commit, a blob\n// is immutable. Before commit, the BlobRef can be used with PutBlob,\n// GetBlobSize, DeleteBlob, and CommitBlob. After commit, PutBlob and\n// CommitBlob can no longer be used. Blob creation can be resumed by\n// obtaining the current blob size with GetBlobSize and appending to the\n// blob via PutBlob.\n//\n// CreateBlob returns a BlobRef for a newly created blob.",
OutArgs: []rpc.ArgDesc{
{"br", ``}, // BlobRef
},