IRPCTest.UploadTestFile_Begin

View as Markdown

Vault API / standard write session idempotent

Starts an upload whose bytes the server discards, for measuring upload throughput.

ServiceConnection and health checks MFiles.IRPCTest
gRPC method/MFiles.IRPCTest/UploadTestFile_Begin
HTTP (mf-http-grpc)POST /grpc/v1/upload-test-file_-begin
RequestUploadTestFile_BeginRequest
ResponseUploadTestFile_BeginResponse
Book and levelVault API, standard
Kindwrite
SessionRequired: the session ID from LogIn in the mfiles-session-id-bin metadata.
Idempotentyes
Returns metadata structure versionno
Streamingnone (unary)

Remarks

Needs a vault session. Without a session the call fails with UNAUTHENTICATED; a server-level session fails with E_MFILES_LOGIN_REQUIRED.

The response's upload_id is always -1, which tells the upload methods to accept the bytes and store nothing. Nothing is created, so there is nothing to clean up:

  1. Call this method; it returns upload_id -1.
  2. Send the blocks with UploadTempFile, each with upload_id -1, total_size_in_bytes and the offset of the block, and time those calls. Each call succeeds and returns upload_id 0; keep using -1.
  3. Optionally finish with UploadTempFileCommit with upload_id -1, as a real upload would.

Use the block size your application uses for real uploads, so that the measurement matches.

Request: UploadTestFile_BeginRequest

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
file_sizeint64The planned size of the test upload.

Response: UploadTestFile_BeginResponse

Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

FieldTypeDescription
upload_idint32Always -1. Pass it to UploadTempFile and UploadTempFileCommit.