forked from TrueCloudLab/frostfs-api
[#194] object: Add status returns related to LOCKs
Add `status.Object` section for object failures. Add `LOCKED` and `LOCK_NON_REGULAR_OBJECT` codes to it. Return these codes from `Put` and `Delete` RPCs of `ObjectService`. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3793783ed4
commit
7b83b9df4e
2 changed files with 18 additions and 2 deletions
|
@ -35,7 +35,13 @@ service ObjectService {
|
|||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS):
|
||||
// object has been successfully saved in the container;
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **LOCKED** (2048, SECTION_OBJECT):
|
||||
// placement of an object of type TOMBSTONE that includes at least one locked
|
||||
// object is prohibited;
|
||||
// - **LOCK_NON_REGULAR_OBJECT** (2049, SECTION_OBJECT):
|
||||
// placement of an object of type LOCK that includes at least one object of
|
||||
// type other than REGULAR is prohibited.
|
||||
rpc Put(stream PutRequest) returns (PutResponse);
|
||||
|
||||
// Delete the object from a container. There is no immediate removal
|
||||
|
@ -44,7 +50,9 @@ service ObjectService {
|
|||
// Statuses:
|
||||
// - **OK** (0, SECTION_SUCCESS):
|
||||
// object has been successfully marked to be removed from the container;
|
||||
// - Common failures (SECTION_FAILURE_COMMON).
|
||||
// - Common failures (SECTION_FAILURE_COMMON);
|
||||
// - **LOCKED** (2048, SECTION_OBJECT):
|
||||
// deleting a locked object is prohibited.
|
||||
rpc Delete(DeleteRequest) returns (DeleteResponse);
|
||||
|
||||
// Returns the object Headers without data payload. By default full header is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue