File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,8 @@ class OpportunisticStreamingCarBlockStore(BlockStore):
119119
120120 This should work in 99.999% of cases. The fallback case could fail if the CAR
121121 starts off in canonical order, but has duplicate record CIDs where the second
122- record is *not* duplicated into the CAR.
122+ record is *not* duplicated into the CAR. Duplicate CIDs are relatively common
123+ in-the-wild, but accidentally-canonical block order is rare.
123124
124125 In such a case, an OptimisticRetryError is raised, and the caller should
125126 retry from scratch with optimistic=False.
@@ -152,6 +153,8 @@ def get_block(self, key: bytes) -> bytes:
152153 self ._optimistic = False
153154 self ._blocks [bytes (k )] = v
154155 self ._slurp (self ._car_iter )
156+ # fall thru
157+
155158 try :
156159 return self ._blocks [key ]
157160 except KeyError :
You can’t perform that action at this time.
0 commit comments