winery: try harder to record shards as mapped
When both hosts try to record the shard as mapped read-only at the same time, one of them can fail. This situation cannot be recovered from automatically.
To recover from the situation, first, add a retry to the record_shard_mapped call, which should make it succeed from within the main loop; second, when initializing the list of shards, if the shard is mapped read-only and its state is "PACKED" (which should be pretty rare), then mark it as mapped.
Merge request reports
Activity
Jenkins job DOBJS/gitlab-builds #271 succeeded .
See Console Output and Coverage Report for more details.Jenkins job DOBJS/gitlab-builds #273 succeeded .
See Console Output and Coverage Report for more details.added 19 commits
-
8a049711...97fa8377 - 9 commits from branch
swh/devel:master
- f01631fd - Remove random objstorage generator
- 7e7b7559 - Fully remove support for plain bytes to address objects
- b1c4d9d9 - factory: use the fully qualified class name for winery
- 05de0f8c - winery stats: avoid race condition in os.makedirs
- 7c96de3e - Improve support for non-sha1 PRIMARY_HASH
- db8604e0 - winery: implement __iter__ and list_content
- fc5262d1 - winery: raise an ObjNotFoundError for the passed obj_id when not found
- f3d14c72 - winery: update delete implementation to conform with the interface
- dce46548 - winery tests: run the common objstorage test suite
- 4ae070a8 - winery: try harder to record shards as mapped
Toggle commit list-
8a049711...97fa8377 - 9 commits from branch
Jenkins job DOBJS/gitlab-builds #305 failed in 3 min 17 sec.
See Console Output, Blue Ocean and Coverage Report for more details.added 6 commits
- 9ce9c182 - Improve support for non-sha1 PRIMARY_HASH
- 5653091d - winery: implement __iter__ and list_content
- 3c309a5c - winery: raise an ObjNotFoundError for the passed obj_id when not found
- 9508d1f5 - winery: update delete implementation to conform with the interface
- 4ef01107 - winery tests: run the common objstorage test suite
- 6ed974e4 - winery: try harder to record shards as mapped
Toggle commit listJenkins job DOBJS/gitlab-builds #307 succeeded in 3 min 44 sec.
See Console Output, Blue Ocean and Coverage Report for more details.lgtm, (maybe add a comment near this line with the message why it's probably good enough (but might need future tweaking).
added 1 commit
- 018f1358 - winery: try harder to record shards as mapped
Jenkins job DOBJS/gitlab-builds #308 succeeded in 5 min 2 sec.
See Console Output, Blue Ocean and Coverage Report for more details.added 9 commits
- 68f09c38 - winery stats: avoid race condition in os.makedirs
- 551e51e9 - Improve support for non-sha1 PRIMARY_HASH
- 2a968a88 - winery: implement __iter__ and list_content
- 021eca6a - winery: raise an ObjNotFoundError for the passed obj_id when not found
- bb95d712 - winery: update delete implementation to conform with the interface
- 1e926203 - winery tests: run the common objstorage test suite
- 2b49f887 - Introduce LiteralHash and LiteralPrimaryHash type aliases
- 9d5ea4d7 - Remove usage of typing_extensions
- e05c54fa - winery: try harder to record shards as mapped
Toggle commit listJenkins job DOBJS/gitlab-builds #310 succeeded in 3 min 14 sec.
See Console Output, Blue Ocean and Coverage Report for more details.Jenkins job DOBJS/gitlab-builds #313 succeeded in 5 min 32 sec.
See Console Output, Blue Ocean and Coverage Report for more details.