isolation2 lockmodes fails on cassert builds: extra AccessShareLock on partition root
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with the isolation2 lockmodes test and its expected output files; the issue identifies the GDD-off INSERT INTO t_lockmods_part_tbl_dml case and explains the cassert relcache behavior. Quit session 1 before that case, then update the expected files. Done means the test passes on assert-enabled builds with ORCA and the expected lock output matches.
Written by the indexing model from the issue text.
Description
The isolation2 lockmodes test fails on assert-enabled builds (--enable-cassert) with ORCA on. Seen on the Debug workflow in #2328, same diff on two runs:
1: select * from show_locks_lockmodes;
locktype | mode | granted | relation
----------+------------------+---------+---------------------------------
+ relation | AccessShareLock | t | t_lockmods_part_tbl_dml
relation | RowExclusiveLock | t | t_lockmods_part_tbl_dml
relation | RowExclusiveLock | t | t_lockmods_part_tbl_dml_1_prt_1
relation | RowExclusiveLock | t | t_lockmods_part_tbl_dml_1_prt_2
-(3 rows)
+(4 rows)
https://github.com/apache/cloudberry/actions/runs/44457186410/job/135340162927
This is the GDD-off INSERT INTO t_lockmods_part_tbl_dml ... case. The test already explains why the extra lock appears: with cassert, RELCACHE_FORCE_RELEASE drops the relcache entry on close, so generate_partition_qual() reopens the root with AccessShareLock. That's why the later cases start with 1q:, so they always run without a cached relcache.
The INSERT case (added in 454814d0e8f) sits before that comment and reuses session 1. On a Release build the root is still cached, so there's no lock; on a cassert build there is.
Fix: quit session 1 before the INSERT case and update the expected files.
- Dominant language
- C
- Stars
- 1.4k
- Forks
- 273
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 105
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/cloudberry
-
psql tab completion broken for storage servers, tags, profiles and resource groups (pre-PG15 query format)Possibly taken @allenvox claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/cloudberry#2316 ·
Maintainers usually reply within 2 days
-
[Bug] Expand fails to recognize user-defined tablespacesPossibly taken @nix-oss claimed this 92 days ago. Opentype: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apache/cloudberry#1885 · 2 reactions ·
Maintainers usually reply within 2 days
-
gpexpand first stage fails: 'SyncPackages' object has no attribute 'ret' (extension sync never runs; regression)Possibly taken @talmacschen-arch claimed this 153 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
apache/cloudberry#1825 ·
Maintainers usually reply within 2 days
-
type: Bug
Difficulty 4/5 3-5 days Newbie friendliness 53/100
apache/cloudberry#2350 · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
apache/cloudberry#2348 · 1 comment ·
Maintainers usually reply within 2 days
All issues in apache/cloudberry
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
windows-artifacts: the win-arm64 job uses a Visual Studio generator missing from windows-11-armOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
wasm-micro-runtime/wasm-micro-runtime#5217 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HandBrake/HandBrake#8278 · 1 comment ·
Maintainers usually reply within 1 day