apache / apache/lucene

add XA transaction support [LUCENE-1149]

Open
#2,226 4 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major module:core/index type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Need to add XA transaction support to Lucene.

Without XA support, it is difficult to keep disparate resources (e.g. database) in sync with the Lucene index.

A review of the XA support added to Hibernate might be a good start (although Hibernate almost always uses a XA capable backing store database).

It would be ideal to have a combined IndexReaderWriter instance, then create a XAIndexReaderWriter which wraps it.

The implementation might be as simple as a XA log file which lists the XA transaction id, and the segments XXX number(s), since Lucene already allows you to rollback to a previous version (??? for sure, or does it only allow you to abort the current commit).

If operating under a XA transaction, the no explicit commits or rollbacks should be allowed on the instance.

The index would be committed during XA prepare(), and then if needed rolledback when requested. The XA commit() would be a no-op.

There is a lot more to this but this should get the ball rolling.

---
Migrated from [LUCENE-1149](https://issues.apache.org/jira/browse/LUCENE-1149) by robert engels, 2 votes, updated May 16 2011

Contributor guide

Open the contributing guide

Research direction

No implementation files or tests are named. Start by reviewing the XA support added to Hibernate and Lucene's existing commit and rollback behavior; completion would require an XA-aware IndexReaderWriter design with prepare, commit, rollback, and restrictions on explicit commits or rollbacks during XA transactions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.