Skip to content

Commit 6b09169

Browse files
authored
DAOS-18901 vos: Cap merged extent size (#18139)
Cap the merged extent size at the defined threshold. Signed-off-by: Niu Yawei <yawei.niu@hpe.com>
1 parent dcdd807 commit 6b09169

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/vos/vos_aggregate.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* (C) Copyright 2019-2024 Intel Corporation.
33
* (C) Copyright 2025 Google LLC
4-
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
4+
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
55
*
66
* SPDX-License-Identifier: BSD-2-Clause-Patent
77
*/
@@ -1858,8 +1858,9 @@ trigger_flush(struct agg_merge_window *mw, struct evt_extent *lgc_ext)
18581858
D_AGG_ASSERTF(mw, w_ext->ex_hi < lgc_ext->ex_lo, "win:" DF_EXT ", lgc_ent:" DF_EXT "\n",
18591859
DP_EXT(w_ext), DP_EXT(lgc_ext));
18601860

1861-
/* Window is large enough */
1862-
if (merge_window_size(mw) >= mw->mw_flush_thresh)
1861+
/* Cap the merged extent at the defined threshold */
1862+
if ((merge_window_size(mw) + (evt_extent_width(lgc_ext) * mw->mw_rsize)) >
1863+
mw->mw_flush_thresh)
18631864
return true;
18641865

18651866
/* To avoid too large local tx, we merge at most MW_MAX_MERGE_CNT in a single tx */

0 commit comments

Comments
 (0)