Chris Lu
ca81c0c525
fix(ec): pass per-volume data-shard count to the parity-shard split ( #9781 )
...
* fix(ec): pass per-volume data-shard count to the parity-shard split
ShardsInfo.DeleteParityShards/MinusParityShards looped ids 10..13, assuming
the fixed 10+4 layout. For a non-default ratio this splits data vs parity
wrong — a wide ratio (12+4, 16+6) drops real data ids >= 10, which breaks
ec.decode. They now take a dataShards argument (<= 0 falls back to
DataShardsCount) and clear ids dataShards..MaxShardCount. ec.decode threads
the data-shard count from collectEcNodeShardsInfo to both split call sites,
and admin LogicalSize passes DataShardsCount.
Also: EC cleanup now sets an explicit per-disk storage impact
(-len(ShardIds)) instead of falling back to the TotalShardsCount constant,
so freed-capacity accounting matches the shards actually removed.
OSS is always 10+4, so behavior is unchanged here; this keeps the split
ratio-correct and the API aligned with the enterprise per-volume override.
Adds parity-split ratio tests.
* ec: clear parity shards in one locked pass
Address review: DeleteParityShards looped si.Delete, taking the lock once per
id. shards is sorted by Id and shardBits is a bitmap, so mask off the high
bits and truncate the sorted slice at the first parity id (binary search) under
a single lock. Preserves the dataShards<=0 -> DataShardsCount default.
2026-06-01 19:25:15 -07:00
..
2026-06-01 15:11:02 -07:00
2026-01-07 13:06:08 -08:00
2026-01-07 13:06:08 -08:00
2026-01-07 13:06:08 -08:00
2026-01-07 13:06:08 -08:00
2026-01-07 13:06:08 -08:00
2026-01-07 13:06:08 -08:00
2026-05-20 23:31:21 -07:00
2026-05-20 23:31:21 -07:00
2025-11-09 19:58:38 -08:00
2026-04-21 20:17:42 -07:00
2026-04-21 20:17:42 -07:00
2026-03-03 15:10:40 -08:00
2026-05-31 18:52:44 -07:00
2026-06-01 19:25:15 -07:00
2026-02-09 01:37:56 -08:00
2026-06-01 19:25:15 -07:00
2026-03-14 20:59:47 -07:00
2026-03-14 16:18:29 -07:00
2026-05-31 18:52:44 -07:00
2026-05-22 20:22:09 -07:00
2025-10-24 20:21:35 -07:00
2025-10-24 20:21:35 -07:00
2026-05-07 17:45:04 -07:00
2026-04-17 21:09:36 -07:00
2026-04-17 21:09:36 -07:00
2025-10-24 20:21:35 -07:00
2026-01-07 13:06:08 -08:00
2025-10-24 20:21:35 -07:00
2026-04-23 19:17:35 -07:00
2025-10-24 20:21:35 -07:00
2026-04-28 12:30:13 -07:00
2026-04-28 12:30:13 -07:00
2026-01-14 21:37:50 -08:00
2026-06-01 09:54:22 -07:00
2025-10-24 20:21:35 -07:00
2025-10-24 20:21:35 -07:00
2025-10-24 20:21:35 -07:00
2025-10-24 20:21:35 -07:00
2025-10-24 20:21:35 -07:00
2026-06-01 09:54:22 -07:00
2026-01-07 13:06:08 -08:00
2025-10-17 22:11:50 -07:00
2026-01-07 13:06:08 -08:00
2025-10-13 18:05:17 -07:00
2026-05-12 12:37:09 -07:00
2026-01-07 13:06:08 -08:00
2026-01-07 13:06:08 -08:00
2025-09-09 01:01:03 -07:00
2026-03-17 16:49:56 -07:00
2026-05-07 17:45:04 -07:00
2026-03-11 12:55:45 -07:00
2026-01-14 14:45:52 -08:00
2026-03-12 15:21:07 -07:00
2026-03-13 09:36:54 -07:00
2026-02-05 12:57:27 -08:00
2026-02-05 12:57:27 -08:00
2026-01-07 13:06:08 -08:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-03-25 23:09:53 -07:00
2026-05-18 13:42:32 -07:00
2026-01-27 10:50:16 -08:00
2025-12-13 13:41:25 -08:00
2025-12-12 18:06:13 -08:00
2026-01-27 10:50:16 -08:00
2025-12-12 18:06:13 -08:00
2026-06-01 13:11:18 -07:00
2025-07-16 23:39:27 -07:00
2026-02-26 11:56:10 -08:00
2022-09-16 02:43:49 -07:00
2026-05-07 17:45:04 -07:00
2025-07-16 23:39:27 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-06-01 15:11:02 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-12 18:29:18 -07:00
2026-05-13 00:19:05 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-18 13:42:32 -07:00
2026-05-13 10:48:58 -07:00
2026-04-28 12:30:13 -07:00
2026-01-30 22:57:05 -08:00
2026-04-28 12:30:13 -07:00
2026-01-30 22:57:05 -08:00
2026-03-03 15:10:40 -08:00
2026-05-20 01:39:23 -07:00
2026-05-20 01:39:23 -07:00
2025-12-02 10:14:24 -08:00
2026-05-21 02:16:28 -07:00
2026-01-16 12:31:48 -08:00
2026-02-24 20:07:26 -08:00
2026-05-06 15:19:43 -07:00
2026-05-06 15:19:43 -07:00
2024-09-26 08:34:13 -07:00
2026-05-06 15:19:43 -07:00
2026-06-01 09:54:22 -07:00
2026-01-07 13:06:08 -08:00
2026-05-31 11:52:39 -07:00
2026-05-31 11:52:39 -07:00
2024-09-29 10:38:22 -07:00
2026-05-28 19:29:25 -07:00
2026-05-28 19:29:25 -07:00
2026-01-07 13:06:08 -08:00
2026-05-06 15:19:43 -07:00
2026-03-26 10:20:57 -07:00
2023-03-13 10:00:27 -07:00
2026-05-20 10:27:00 -07:00
2025-11-09 19:58:38 -08:00
2026-02-11 11:02:37 -08:00
2026-03-20 23:52:12 -07:00
2026-03-20 23:52:12 -07:00
2025-08-23 11:04:24 -07:00
2026-05-21 02:16:28 -07:00
2026-05-06 15:19:43 -07:00
2026-01-07 13:06:08 -08:00
2024-09-29 10:38:22 -07:00
2024-09-29 10:38:22 -07:00
2026-04-20 15:32:31 -07:00
2026-04-07 14:10:15 -07:00
2026-05-21 02:16:28 -07:00
2025-12-15 11:18:45 -08:00
2026-01-16 12:31:48 -08:00
2026-04-03 16:04:27 -07:00
2026-01-06 00:09:52 -08:00
2026-06-01 15:11:02 -07:00
2026-04-08 13:07:15 -07:00
2025-12-15 11:18:45 -08:00
2025-12-15 11:18:45 -08:00
2025-12-15 11:18:45 -08:00