With write_prepare policy, after XA prepare but not commit, then shutdown the rocksdb, shutdown processing core.
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://www.facebook.com/groups/rocksdb.dev
### Expected behavior
With myrocks, in XA transaction scenario, with write prepare policy, after XA prepare, but before commit this transaction, shutdown the mysql server, the shutdown process core because the prepareheap assert fail in its destructor, the assert need make sure the prepare heap empty when destroy itself. But in XA scenario, the prepareheap high possibilty non-empty since there are prepared but not committed transaction.
So it is expected, in such case, the server can exit smoothly without core generated.
### Actual behavior
Currently, after XA prepared, shutdown the sever will cause core dump.
### Steps to reproduce the behavior
login mysql session:
```sql
XA START 'trx1';
INSERT INTO t1 VALUES (1);
XA END 'trx1';
XA PREPARE 'trx1'
```
```
shutdown;
```
the core will be generated.
Contributor guide
Assessment
This issue has not been assessed yet.