File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -808,11 +808,23 @@ pub async fn copy_object(
808808/// RFC 7232 §3.1. True iff the If-Match precondition is satisfied.
809809pub ( crate ) fn match_if_match ( header : & str , current : Option < & str > ) -> bool {
810810 let h = header. trim ( ) ;
811- if h == "*" {
812- return current. is_some ( ) ;
813- }
814- let Some ( cur) = current else { return false ; } ;
815- parse_etag_list ( h) . any ( |t| t == cur)
811+ let result = if h == "*" {
812+ current. is_some ( )
813+ } else {
814+ match current {
815+ Some ( cur) => parse_etag_list ( h) . any ( |t| t == cur) ,
816+ None => false ,
817+ }
818+ } ;
819+ // TEMPORARY DIAGNOSTIC for #29 — emits exactly what's compared on every
820+ // If-Match check. Remove once duplicate-bucket / 412-loop is closed.
821+ tracing:: warn!(
822+ if_match = %h,
823+ current = ?current,
824+ result,
825+ "match_if_match diag"
826+ ) ;
827+ result
816828}
817829
818830/// RFC 7232 §3.2. True iff the If-None-Match precondition is satisfied.
Original file line number Diff line number Diff line change @@ -3383,6 +3383,14 @@ impl EncryptedClient {
33833383 . with_metadata ( "fula-bucket-lookup-h" , & self . compute_bucket_lookup_h_hex ( bucket) )
33843384 . with_metadata ( "fula-forest-manifest" , "1" ) ;
33853385
3386+ // TEMPORARY DIAGNOSTIC for #29.
3387+ tracing:: warn!(
3388+ bucket,
3389+ index_key,
3390+ prior_etag = ?prior_etag,
3391+ next_sequence,
3392+ "save_forest (v1 monolithic) conditional PUT diag"
3393+ ) ;
33863394 let put_result = self . inner . put_object_with_metadata_conditional (
33873395 bucket,
33883396 & index_key,
@@ -3724,6 +3732,14 @@ impl EncryptedClient {
37243732 . with_metadata ( "fula-bucket-lookup-h" , & lookup_h_hex)
37253733 . with_metadata ( "fula-forest-manifest" , "1" ) ;
37263734
3735+ // TEMPORARY DIAGNOSTIC for #29.
3736+ tracing:: warn!(
3737+ bucket,
3738+ index_key,
3739+ prior_etag = ?prior_etag,
3740+ new_seq = next_seq,
3741+ "phase2 conditional PUT diag"
3742+ ) ;
37273743 let put_result = self . inner . put_object_with_metadata_conditional (
37283744 bucket,
37293745 & index_key,
Original file line number Diff line number Diff line change @@ -34,4 +34,4 @@ echo "===== Tailing $CONTAINER (Ctrl-C to stop). Now upload an image from FxFile
3434echo " " >&2
3535
3636docker logs --since 5s -f " $CONTAINER " 2>&1 | grep --line-buffered -iE \
37- ' images|bucket_lookup_h|forest_manifest_cid|flush.*bucket|persist.*registry|concurrent modification|412 Precondition|ConcurrentModificationExhausted|put_object_flat|Phase ?2|save_(sharded_hamt_)?forest|Populated|Restoring bucket|BucketAlreadyExists'
37+ ' images|bucket_lookup_h|forest_manifest_cid|flush.*bucket|persist.*registry|concurrent modification|412 Precondition|ConcurrentModificationExhausted|put_object_flat|Phase ?2|save_(sharded_hamt_)?forest|Populated|Restoring bucket|BucketAlreadyExists|match_if_match diag|conditional PUT diag '
You can’t perform that action at this time.
0 commit comments