morningman opened a new pull request, #65357:
URL: https://github.com/apache/doris/pull/65357
## Proposed changes
Fix two flaky failures found in a branch-4.0 P0 regression run (both in the
backup/restore area).
Root causes were confirmed from the FE/BE logs of that run.
### 1. `test_backup_restore_retention_count` — NPE in `createPartition`
under concurrent partition drop
An auto-partition INSERT creates partitions on the fly via the
`createPartition` RPC.
`FrontendServiceImpl.createPartition()` adds the partitions and then reads
them back to build the
tablet-location response, **without null-checking**
`table.getPartition(partitionName)`. When
`DynamicPartitionScheduler` concurrently drops a just-created history
partition (enforcing
`partition.retention_count`), the read-back gets `null` and
`partition.getId()` throws NPE:
```
Caused by: java.lang.NullPointerException: Cannot invoke
"org.apache.doris.catalog.Partition.getId()" because "partition" is null
at
org.apache.doris.service.FrontendServiceImpl.createPartition(FrontendServiceImpl.java:3885)
```
The unchecked exception escapes to the Thrift layer as `Internal error
processing createPartition`,
failing the load with `THRIFT_RPC_ERROR`. This can affect any auto-partition
table with
dynamic-partition / `retention_count` cleanup, not only the test.
- FE: null-check the read-back and return a retryable error status instead
of throwing NPE.
- Test: retry the INSERT on the transient race (surfaced when a concurrent
suite lowers the global
`dynamic_partition_check_interval_seconds`).
### 2. `test_ddl_backup_auth` — global backup lock contention
BACKUP submission serializes on a single global `BackupHandler` lock via
`tryLock(10s)`. Under
parallel P0 with many concurrent backup/restore suites, that lock can be
held past 10s by slow S3
operations, so submission transiently fails with `Another backup or restore
job is being submitted`.
The suite only verifies auth, so it now retries the submit on that
contention.
## Release note
None
## Check list
- [x] Does this need documentation? No
- [x] Confirm the target branch is `branch-4.0`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]