github.com/cockroachdb/pebble@v1.1.1-0.20240513155919-3622ade60459/objstorage/objstorageprovider/testdata/provider/local (about)

     1  # Basic provider tests without shared storage.
     2  
     3  open p0 0
     4  ----
     5  <local fs> mkdir-all: p0 0755
     6  <local fs> open-dir: p0
     7  
     8  create 1 local 1 1024
     9  foo
    10  ----
    11  <local fs> create: p0/000001.sst
    12  <local fs> sync-data: p0/000001.sst
    13  <local fs> close: p0/000001.sst
    14  
    15  read 1
    16  0 512
    17  0 1024
    18  512 1024
    19  ----
    20  <local fs> open: p0/000001.sst
    21  size: 1024
    22  <local fs> read-at(0, 512): p0/000001.sst
    23  0 512: ok (salt 1)
    24  <local fs> read-at(0, 1024): p0/000001.sst
    25  0 1024: ok (salt 1)
    26  <local fs> prefetch(512, 65536): p0/000001.sst
    27  <local fs> read-at(512, 1024): p0/000001.sst
    28  512 1024: EOF
    29  <local fs> close: p0/000001.sst
    30  
    31  # A provider without shared storage creates object with shared preference
    32  # locally.
    33  create 2 shared 2 1024
    34  ----
    35  <local fs> create: p0/000002.sst
    36  <local fs> sync-data: p0/000002.sst
    37  <local fs> close: p0/000002.sst
    38  
    39  read 2
    40  0 512
    41  0 1024
    42  512 1024
    43  ----
    44  <local fs> open: p0/000002.sst
    45  size: 1024
    46  <local fs> read-at(0, 512): p0/000002.sst
    47  0 512: ok (salt 2)
    48  <local fs> read-at(0, 1024): p0/000002.sst
    49  0 1024: ok (salt 2)
    50  <local fs> prefetch(512, 65536): p0/000002.sst
    51  <local fs> read-at(512, 1024): p0/000002.sst
    52  512 1024: EOF
    53  <local fs> close: p0/000002.sst
    54  
    55  remove 1
    56  ----
    57  <local fs> remove: p0/000001.sst
    58  
    59  list
    60  ----
    61  000002 -> p0/000002.sst
    62  
    63  read 1
    64  ----
    65  file 000001 (type 2) unknown to the objstorage provider: file does not exist
    66  
    67  link-or-copy 3 local 3 100
    68  ----
    69  <local fs> create: temp-file-1
    70  <local fs> close: temp-file-1
    71  <local fs> link: temp-file-1 -> p0/000003.sst
    72  
    73  read 3
    74  0 100
    75  ----
    76  <local fs> open: p0/000003.sst
    77  size: 100
    78  <local fs> read-at(0, 100): p0/000003.sst
    79  0 100: ok (salt 3)
    80  <local fs> close: p0/000003.sst
    81  
    82  link-or-copy 4 shared 4 1234
    83  ----
    84  <local fs> create: temp-file-2
    85  <local fs> close: temp-file-2
    86  <local fs> link: temp-file-2 -> p0/000004.sst
    87  
    88  read 4
    89  0 1234
    90  ----
    91  <local fs> open: p0/000004.sst
    92  size: 1234
    93  <local fs> read-at(0, 1234): p0/000004.sst
    94  0 1234: ok (salt 4)
    95  <local fs> close: p0/000004.sst
    96  
    97  close
    98  ----
    99  <local fs> sync: p0
   100  <local fs> close: p0