[#1175] metabase: Work with LOCK objects

After introduction of LOCK objects (of type `TypeLock`) complicated
extended its behavior:
  * create `lockers` container bucket (LCB) during PUT;
  * remove object from LCB during DELETE;
  * look up object in LCB during EXISTS;
  * get object from LCB during GET;
  * list objects from LCB during LIST with cursor;
  * select objects from LCB during SELECT with '*'.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-02-15 15:51:56 +03:00 committed by LeL
parent 9f13674a10
commit 9508633a7e
13 changed files with 97 additions and 18 deletions

View file

@ -76,7 +76,7 @@ func TestDB_Containers(t *testing.T) {
func TestDB_ContainersCount(t *testing.T) {
db := newDB(t)
const R, T, SG = 10, 11, 12 // amount of object per type
const R, T, SG, L = 10, 11, 12, 13 // amount of object per type
uploadObjects := [...]struct {
amount int
@ -85,9 +85,10 @@ func TestDB_ContainersCount(t *testing.T) {
{R, objectSDK.TypeRegular},
{T, objectSDK.TypeTombstone},
{SG, objectSDK.TypeStorageGroup},
{L, objectSDK.TypeLock},
}
expected := make([]*cid.ID, 0, R+T+SG)
expected := make([]*cid.ID, 0, R+T+SG+L)
for _, upload := range uploadObjects {
for i := 0; i < upload.amount; i++ {