github.com/cockroachdb/pebble@v1.1.2/objstorage/objstorageprovider/testdata/provider/shared_basic (about)

     1  # Basic provider tests with shared storage.
     2  
     3  # open <fs-dir> <creator-id>
     4  open p1 1
     5  ----
     6  <local fs> mkdir-all: p1 0755
     7  <local fs> open-dir: p1
     8  <local fs> open-dir: p1
     9  <local fs> create: p1/REMOTE-OBJ-CATALOG-000001
    10  <local fs> sync: p1/REMOTE-OBJ-CATALOG-000001
    11  <local fs> create: p1/marker.remote-obj-catalog.000001.REMOTE-OBJ-CATALOG-000001
    12  <local fs> close: p1/marker.remote-obj-catalog.000001.REMOTE-OBJ-CATALOG-000001
    13  <local fs> sync: p1
    14  <local fs> sync: p1/REMOTE-OBJ-CATALOG-000001
    15  
    16  create 1 local 1 100
    17  ----
    18  <local fs> create: p1/000001.sst
    19  <local fs> sync-data: p1/000001.sst
    20  <local fs> close: p1/000001.sst
    21  
    22  read 1
    23  0 100
    24  ----
    25  <local fs> open: p1/000001.sst (options: *vfs.randomReadsOption)
    26  size: 100
    27  <local fs> read-at(0, 100): p1/000001.sst
    28  0 100: ok (salt 1)
    29  <local fs> close: p1/000001.sst
    30  
    31  create 2 shared 2 100
    32  ----
    33  <remote> create object "a629-1-000002.sst"
    34  <remote> close writer for "a629-1-000002.sst" after 100 bytes
    35  <remote> create object "a629-1-000002.sst.ref.1.000002"
    36  <remote> close writer for "a629-1-000002.sst.ref.1.000002" after 0 bytes
    37  
    38  read 2
    39  0 100
    40  ----
    41  <remote> size of object "a629-1-000002.sst.ref.1.000002": 0
    42  <remote> create reader for object "a629-1-000002.sst": 100 bytes
    43  size: 100
    44  <remote> read object "a629-1-000002.sst" at 0 (length 100)
    45  0 100: ok (salt 2)
    46  <remote> close reader for "a629-1-000002.sst"
    47  
    48  list
    49  ----
    50  000001 -> p1/000001.sst
    51  000002 -> remote://a629-1-000002.sst
    52  
    53  close
    54  ----
    55  <local fs> sync: p1
    56  <local fs> sync: p1/REMOTE-OBJ-CATALOG-000001
    57  <local fs> close: p1/REMOTE-OBJ-CATALOG-000001
    58  <local fs> close: p1
    59  
    60  # Test that the objects are there on re-open.
    61  open p1 1
    62  ----
    63  <local fs> mkdir-all: p1 0755
    64  <local fs> open-dir: p1
    65  <local fs> open-dir: p1
    66  <local fs> open: p1/REMOTE-OBJ-CATALOG-000001
    67  <local fs> close: p1/REMOTE-OBJ-CATALOG-000001
    68  
    69  list
    70  ----
    71  000001 -> p1/000001.sst
    72  000002 -> remote://a629-1-000002.sst
    73  
    74  remove 1
    75  ----
    76  <local fs> remove: p1/000001.sst
    77  
    78  remove 2
    79  ----
    80  <remote> delete object "a629-1-000002.sst.ref.1.000002"
    81  <remote> list (prefix="a629-1-000002.sst.ref.", delimiter="")
    82  <remote> delete object "a629-1-000002.sst"
    83  
    84  link-or-copy 3 local 3 100
    85  ----
    86  <local fs> create: temp-file-1
    87  <local fs> close: temp-file-1
    88  <local fs> link: temp-file-1 -> p1/000003.sst
    89  
    90  read 3
    91  0 100
    92  ----
    93  <local fs> open: p1/000003.sst (options: *vfs.randomReadsOption)
    94  size: 100
    95  <local fs> read-at(0, 100): p1/000003.sst
    96  0 100: ok (salt 3)
    97  <local fs> close: p1/000003.sst
    98  
    99  link-or-copy 4 shared 4 100
   100  ----
   101  <local fs> create: temp-file-2
   102  <local fs> close: temp-file-2
   103  <remote> create object "2f2f-1-000004.sst"
   104  <local fs> open: temp-file-2 (options: *vfs.sequentialReadsOption)
   105  <remote> close writer for "2f2f-1-000004.sst" after 100 bytes
   106  <remote> create object "2f2f-1-000004.sst.ref.1.000004"
   107  <remote> close writer for "2f2f-1-000004.sst.ref.1.000004" after 0 bytes
   108  <local fs> close: temp-file-2
   109  
   110  read 4
   111  0 100
   112  ----
   113  <remote> size of object "2f2f-1-000004.sst.ref.1.000004": 0
   114  <remote> create reader for object "2f2f-1-000004.sst": 100 bytes
   115  size: 100
   116  <remote> read object "2f2f-1-000004.sst" at 0 (length 100)
   117  0 100: ok (salt 4)
   118  <remote> close reader for "2f2f-1-000004.sst"
   119  
   120  close
   121  ----
   122  <local fs> sync: p1
   123  <local fs> create: p1/REMOTE-OBJ-CATALOG-000002
   124  <local fs> sync: p1/REMOTE-OBJ-CATALOG-000002
   125  <local fs> create: p1/marker.remote-obj-catalog.000002.REMOTE-OBJ-CATALOG-000002
   126  <local fs> close: p1/marker.remote-obj-catalog.000002.REMOTE-OBJ-CATALOG-000002
   127  <local fs> remove: p1/marker.remote-obj-catalog.000001.REMOTE-OBJ-CATALOG-000001
   128  <local fs> sync: p1
   129  <local fs> remove: p1/REMOTE-OBJ-CATALOG-000001
   130  <local fs> sync: p1/REMOTE-OBJ-CATALOG-000002
   131  <local fs> close: p1/REMOTE-OBJ-CATALOG-000002
   132  <local fs> close: p1