shuke987 opened a new pull request, #64538:
URL: https://github.com/apache/doris/pull/64538
### What problem does this PR solve?
The three nonConcurrent MOW compaction regression cases
- `test_mow_compaction_and_read_stale`
- `test_mow_compaction_and_schema_change`
- `test_mow_compaction_agg_and_remove_pre_delete_bitmap`
asserted `assertEquals(1, tablets.size())` right after `show tablets`.
`show tablets` returns **one row per replica**, so on a cluster that
materializes multiple replicas for the single bucket (the branch-4.1
`NonConcurrent` pipeline creates 3 replicas even when the table requests 1),
the assertion fails at table setup:
```
expected: <1> but was: <3>
```
The 3 rows share the same `TabletId` (one bucket, three replicas), e.g.:
```
TabletId:1781362443532 ReplicaId:...533 BackendId:...351
TabletId:1781362443532 ReplicaId:...534 BackendId:...348
TabletId:1781362443532 ReplicaId:...535 BackendId:...349
```
### What does this PR do?
Assert the real invariant instead — **exactly one distinct tablet**
(`BUCKETS 1`) —
by de-duplicating on `TabletId`, which is independent of replica count:
```groovy
assertEquals(1, tablets.collect { it.TabletId }.unique().size())
```
The cases already operate on a single replica via `tablets[0]`, so the
downstream compaction / delete-bitmap inspection is unaffected.
Related to apache/doris#58662, which relaxed the same check to
`tablets.size() >= 1`; this uses a stricter distinct-tablet assertion. The
same improvement will be proposed on master so the branches reconverge.
### Release note
None
### Check List
- [x] Test <!-- At least one of the following must be checked -->
- [x] Regression test (test-only change)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]