-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
objstorage: improve test and add read ahead test
This change improves the objstorage test to allow reading arbitrary parts of objects. We add a test that verifies that the read-ahead implementation does the Prefetch and the reopen that is expected. We also improve logging FS to log `ReadAt` and `Prefetch` calls. Informs #2531.
- Loading branch information
1 parent
2bc4319
commit 5a6b91b
Showing
14 changed files
with
498 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
objstorage/objstorageprovider/testdata/provider/local_readahead
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
open p1 1 | ||
---- | ||
<local fs> mkdir-all: p1 0755 | ||
<local fs> open-dir: p1 | ||
<local fs> open-dir: p1 | ||
<local fs> create: p1/SHARED-CATALOG-000001 | ||
<local fs> sync: p1/SHARED-CATALOG-000001 | ||
<local fs> create: p1/marker.shared-catalog.000001.SHARED-CATALOG-000001 | ||
<local fs> close: p1/marker.shared-catalog.000001.SHARED-CATALOG-000001 | ||
<local fs> sync: p1 | ||
<local fs> sync: p1/SHARED-CATALOG-000001 | ||
|
||
create 1 local 1 2000000 | ||
---- | ||
<local fs> create: p1/000001.sst | ||
<local fs> sync-data: p1/000001.sst | ||
<local fs> sync-data: p1/000001.sst | ||
<local fs> close: p1/000001.sst | ||
|
||
# We should see prefetch calls, and eventually a reopen | ||
# (with sequential reads option). | ||
read 1 | ||
0 1000 | ||
1000 15000 | ||
16000 30000 | ||
46000 10000 | ||
56000 50000 | ||
106000 30000 | ||
140000 80000 | ||
---- | ||
<local fs> open: p1/000001.sst | ||
size: 2000000 | ||
<local fs> read-at(0, 1000): p1/000001.sst | ||
0 1000: ok (salt 1) | ||
<local fs> read-at(1000, 15000): p1/000001.sst | ||
1000 15000: ok (salt 1) | ||
<local fs> prefetch(16000, 65536): p1/000001.sst | ||
<local fs> read-at(16000, 30000): p1/000001.sst | ||
16000 30000: ok (salt 1) | ||
<local fs> read-at(46000, 10000): p1/000001.sst | ||
46000 10000: ok (salt 1) | ||
<local fs> prefetch(56000, 131072): p1/000001.sst | ||
<local fs> read-at(56000, 50000): p1/000001.sst | ||
56000 50000: ok (salt 1) | ||
<local fs> read-at(106000, 30000): p1/000001.sst | ||
106000 30000: ok (salt 1) | ||
<local fs> open: p1/000001.sst | ||
<local fs> read-at(140000, 80000): p1/000001.sst | ||
140000 80000: ok (salt 1) | ||
<local fs> close: p1/000001.sst | ||
<local fs> close: p1/000001.sst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.