@@ -268,7 +268,7 @@ func (fsh *StorageHandler) GetFileStats(ctx context.Context, r *http.Request) (i
268
268
if err != nil {
269
269
return nil , common .NewError ("bad_db_operation" , "Error retrieving file stats. " + err .Error ())
270
270
}
271
- wm , _ := writemarker .GetWriteMarkerEntity (ctx , fileref .AllocationRoot )
271
+ wm , _ := writemarker .GetWriteMarkerEntity (ctx , allocationID , fileref .AllocationRoot )
272
272
if wm != nil && fileStats != nil {
273
273
fileStats .WriteMarkerRedeemTxn = wm .CloseTxnID
274
274
fileStats .OnChain = wm .OnChain ()
@@ -529,7 +529,7 @@ func (fsh *StorageHandler) GetLatestWriteMarker(ctx context.Context, r *http.Req
529
529
if allocationObj .AllocationRoot == "" {
530
530
latestWM = nil
531
531
} else {
532
- latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationObj .AllocationRoot )
532
+ latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationId , allocationObj .AllocationRoot )
533
533
if err != nil {
534
534
logging .Logger .Error ("[latest_write_marker]" , zap .String ("allocation_root" , allocationObj .AllocationRoot ), zap .String ("allocation_id" , allocationObj .ID ))
535
535
return nil , common .NewError ("latest_write_marker_read_error" , "Error reading the latest write marker for allocation. " + err .Error ())
@@ -539,7 +539,7 @@ func (fsh *StorageHandler) GetLatestWriteMarker(ctx context.Context, r *http.Req
539
539
return nil , common .NewError ("latest_write_marker_read_error" , "Latest write marker not found for allocation." )
540
540
}
541
541
if latestWM .WM .PreviousAllocationRoot != "" {
542
- prevWM , err = writemarker .GetWriteMarkerEntity (ctx , latestWM .WM .PreviousAllocationRoot )
542
+ prevWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationId , latestWM .WM .PreviousAllocationRoot )
543
543
if err != nil {
544
544
return nil , common .NewError ("latest_write_marker_read_error" , "Error reading the previous write marker for allocation." + err .Error ())
545
545
}
@@ -655,7 +655,7 @@ func (fsh *StorageHandler) getReferencePath(ctx context.Context, r *http.Request
655
655
if allocationObj .AllocationRoot == "" {
656
656
latestWM = nil
657
657
} else {
658
- latestWM , err = writemarker .GetWriteMarkerEntity (ctx , rootRef .Hash )
658
+ latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationID , rootRef .Hash )
659
659
if err != nil {
660
660
errCh <- common .NewError ("latest_write_marker_read_error" , "Error reading the latest write marker for allocation." + err .Error ())
661
661
return
@@ -744,7 +744,7 @@ func (fsh *StorageHandler) getReferencePathV2(ctx context.Context, r *http.Reque
744
744
if allocationObj .AllocationRoot == "" {
745
745
latestWM = nil
746
746
} else {
747
- latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationObj .AllocationRoot )
747
+ latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationId , allocationObj .AllocationRoot )
748
748
if err != nil {
749
749
errCh <- common .NewError ("latest_write_marker_read_error" , "Error reading the latest write marker for allocation." + err .Error ())
750
750
return
@@ -821,7 +821,7 @@ func (fsh *StorageHandler) GetObjectTree(ctx context.Context, r *http.Request) (
821
821
if allocationObj .AllocationRoot == "" {
822
822
latestWM = nil
823
823
} else {
824
- latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationObj .AllocationRoot )
824
+ latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationID , allocationObj .AllocationRoot )
825
825
if err != nil {
826
826
return nil , common .NewError ("latest_write_marker_read_error" , "Error reading the latest write marker for allocation." + err .Error ())
827
827
}
@@ -1086,7 +1086,7 @@ func (fsh *StorageHandler) GetRefs(ctx context.Context, r *http.Request) (*blobb
1086
1086
if allocationObj .AllocationRoot == "" {
1087
1087
latestWM = nil
1088
1088
} else {
1089
- latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationObj .AllocationRoot )
1089
+ latestWM , err = writemarker .GetWriteMarkerEntity (ctx , allocationID , allocationObj .AllocationRoot )
1090
1090
if err != nil {
1091
1091
return nil , common .NewError ("latest_write_marker_read_error" , "Error reading the latest write marker for allocation." + err .Error ())
1092
1092
}
0 commit comments