@@ -310,31 +310,38 @@ N/A
310
310
#### Scenario Description
311
311
312
312
` Files Recent Persistence ` will persist a block after it has been received and
313
- verified.
313
+ verified. If the received and verified block's resolved path already exists,
314
+ no matter what the reason is, it must be overwritten with the received block's
315
+ data.
314
316
315
317
#### Expected Behaviour
316
318
317
- It is expected that a regular file is written at the properly resolved location.
318
- It is expected that this file can be overwritten.
319
+ It is expected that when the Block-Node receives the next in sequence block and
320
+ then verifies it, the ` Files Recent Persistence ` will attempt to persist it at
321
+ the resolved path. If a file already exists at that path, it will be truncated
322
+ and overwritten with the received data. An Acknowledged block is deemed final
323
+ and immutable (especially when the next block is received, verified,
324
+ persisted and acknowledged), but that is outside the scope of the
325
+ ` Files Recent Persistence ` . As long as data comes in to the
326
+ ` Files Recent Persistence ` it will be persisted at the resolved path.
319
327
320
328
#### Requirements
321
329
322
- A publisher that is able to stream to the Block-Node under test. A client that
323
- can call the public APIs to read the block (i.e. ` getBlock ` ). Client receives
324
- not found if initially attempts to read the block under test (expected ).
330
+ A publisher that is able to stream to the Block-Node under test. A regular file
331
+ exists at the resolved location of the block under test with some arbitrary test
332
+ data. A client that can call the public API to read the block (i.e. ` getBlock ` ).
325
333
326
334
#### Input
327
335
328
336
Valid block ` 0000000000001234567 ` is streamed as items, waiting for
329
- Acknowledgement (ensure it is persisted). Then it is streamed again with
330
- different binary data. The Block-Node under test must be able to accept the
331
- second stream and overwrite the existing file.
337
+ Acknowledgement (ensure it is persisted).
332
338
333
339
#### Output
334
340
335
341
Regular Readable File:
336
- ` /blocks/000/000/000/000/123/4/0000000000001234567.blk.zstd ` exists and it's
337
- binary content is the same as the second time it was streamed.
342
+ ` /blocks/000/000/000/000/123/4/0000000000001234567.blk.zstd ` exists it's
343
+ binary content is the same as the binary data received via the stream and a
344
+ client is able to read it through the public API (i.e. ` getBlock ` ).
338
345
339
346
#### Other
340
347
0 commit comments