Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIP-31: Transactional Streaming #2664

Closed
kuangye098 opened this issue Sep 27, 2018 · 17 comments
Closed

PIP-31: Transactional Streaming #2664

kuangye098 opened this issue Sep 27, 2018 · 17 comments
Assignees
Labels
area/client type/feature The PR added a new feature or issue requested a new feature
Milestone

Comments

@kuangye098
Copy link
Contributor

kuangye098 commented Sep 27, 2018

This is the master issue for tracking implementing PIP-31: https://docs.google.com/document/d/145VYp09JKTw9jAT-7yNyFU255FptB2_B2Fye100ZXDI/edit#heading=h.40v9f3564x7t

V1: #8657
V2: #8633

@sijie sijie added area/client type/feature The PR added a new feature or issue requested a new feature labels Sep 30, 2018
@sijie
Copy link
Member

sijie commented Sep 30, 2018

@kuangye098 it is a nice feature request. I am wondering if you are interested in implementing this feature, we can collaborate on this if you are interested in contribution.

The producer pulls the pre-processing transaction message.

you mean "produce", instead of "pull", right?

@kuangye098
Copy link
Contributor Author

kuangye098 commented Sep 30, 2018

@sijie You are right, I may have described it incorrectly.

@kuangye098
Copy link
Contributor Author

@sijie I can try to implement it, because in other projects, I have implemented it.

@sijie
Copy link
Member

sijie commented Sep 30, 2018

@kuangye098 that’s awesome. Since it is big feature, it would be good that you can write a PIP (pulsar improvement proposal) to describe your proposal of changes. Then we can discuss in details.

Here is wiki page for all the pulsar PIPs. You can check out how other people wrote them https:/apache/pulsar/wiki

@kuangye098
Copy link
Contributor Author

@sijie OK,I will read it carefully and then write a PIP to describe the proposal of changes.

@sijie
Copy link
Member

sijie commented Sep 30, 2018

great thank you @kuangye098

@codelipenghui
Copy link
Contributor

@sijie Is this the same as you mentioned before(Fast Transaction Message)?

@ConcurrencyPractitioner
Copy link
Contributor

Hi @sijie BTW do you know how we create a PIP on Github? For example, do we need permission granted or something first before we create one.

@sijie
Copy link
Member

sijie commented Feb 28, 2019

@ConcurrencyPractitioner :

You don't need any permissions to start a PIP, but you do need permissions to post the PIP to Pulsar Github Wiki.

So you can just write down a PIP in gist and share it to dev@ mailing list. Any pulsar committer can help you re-post your gist to Pulsar wiki.

@sijie sijie self-assigned this Mar 6, 2019
@sijie sijie changed the title Support for Transactional Message PIP-31: Transactional Streaming Mar 27, 2019
@sijie
Copy link
Member

sijie commented Mar 27, 2019

Here is the PIP for supporting transactions: https://docs.google.com/document/d/145VYp09JKTw9jAT-7yNyFU255FptB2_B2Fye100ZXDI/edit#heading=h.40v9f3564x7t

I will break down this PIP into tasks and update the tasks here. This issue will be used as an anchor for all transaction related tasks.

@sijie
Copy link
Member

sijie commented Apr 22, 2019

Broke the PIP into tasks and updated them in the description.

@sijie sijie added this to the 2.5.0 milestone Apr 22, 2019
@sijie
Copy link
Member

sijie commented Apr 22, 2019

Marked this as for 2.5.0. since we are close to release 2.4.0 soon.

sijie added a commit to sijie/pulsar that referenced this issue Apr 28, 2019
…a store and an in-memory implementation

Master Issue: apache#2664

*Motivation*

Setup the project structure for developing transaction coordinator.

*Changes*

- setup the project structure
- introduce common classes: `TxnID`, `TxnStatus`
- introduce `TransactionMetadataStore` for TC to store and manage the transaction status
- enable checkstyle for `pulsar-transaction`

*NOTES*

All the changes are isolated into `pulsar-transaction` module. Hence it will not block any other changes or releases.
@MarvinCai
Copy link
Contributor

I'm very interesting in this PIP and I could help with some subtasks.

sijie added a commit to sijie/pulsar that referenced this issue Apr 29, 2019
…-memory implementation

Master Issue: apache#2664

*Motivation*

Setup the project structure for developing transaction buffer.

*Changes*

- setup the project structure
- introduce common classes: `TxnID`, `TxnStatus`
- introduce `TransactionBuffer` for broker to store and manage entries for transactions
- enable checkstyle for `pulsar-transaction`

*NOTES*

All the changes are isolated into `pulsar-transaction` module. Hence it will not block any other changes or releases.
@sijie
Copy link
Member

sijie commented Apr 29, 2019

@MarvinCai : @tuteng and I start working on the TC part, and @zymap is already working on the TB part. Maybe you can help us in the acknowledgement part. I will try to do the api and protocol and coordinating the work around.

sijie added a commit that referenced this issue May 7, 2019
…a store and an in-memory implementation (#4161)

* [transaction][coordinator] add the interfaces for transaction metadata store and an in-memory implementation

Master Issue: #2664

*Motivation*

Setup the project structure for developing transaction coordinator.

*Changes*

- setup the project structure
- introduce common classes: `TxnID`, `TxnStatus`
- introduce `TransactionMetadataStore` for TC to store and manage the transaction status
- enable checkstyle for `pulsar-transaction`

*NOTES*

All the changes are isolated into `pulsar-transaction` module. Hence it will not block any other changes or releases.
sijie added a commit that referenced this issue May 24, 2019
…-memory implementation (#4165)

Master Issue: #2664

*Motivation*

Setup the project structure for developing transaction buffer.

*Changes*

- setup the project structure
- introduce common classes: `TxnID`, `TxnStatus`
- introduce `TransactionBuffer` for broker to store and manage entries for transactions
- enable checkstyle for `pulsar-transaction`

*NOTES*

All the changes are isolated into `pulsar-transaction` module. Hence it will not block any other changes or releases.
sijie pushed a commit that referenced this issue Jun 17, 2019
…cknowledgement path (#4265)

Master Issue: #2664

Motivation:
Add acknowledgeMessage, commit, abort for transaction in PersistentSubscription.

Changes:
Will put message in Pending_ACK status when acknowledgeMessage is called with TxnID.
No real status class introduced, only added collection to hold messages in Pending_ACK status.
Current PR only keep Pending_ACK state in memory, in subsequent PR will also persistent these pending acks so we can recover from broker failure.

Add commitTxn to put message to Deleted status.
Add abortTxn to put message to Pending status.

For normal acknowledgeMessage and redeliverUnacknowledgedMessages, will check to see if 
message if message is in Pending_ACK first. If true, will **ignore** those acks/redeliverys.

Add unit test.
codelipenghui pushed a commit that referenced this issue Aug 14, 2020
Master Issue: #2664 

Fix https:/streamnative/pulsar/issues/1304

### Motivation

Currently, the consumer can't receive transaction messages.

### Modifications

Support process the commit marker in the topic partition and fetch transaction messages from TransactionBuffer.
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this issue Aug 24, 2020
Master Issue: apache#2664 

Fix https:/streamnative/pulsar/issues/1304

### Motivation

Currently, the consumer can't receive transaction messages.

### Modifications

Support process the commit marker in the topic partition and fetch transaction messages from TransactionBuffer.
codelipenghui pushed a commit that referenced this issue Sep 4, 2020
Fix https:/streamnative/pulsar/issues/1307

Master Issue: #2664 

### Motivation

Handle acknowledge in the transaction.

### Modifications

1. Register subscription to the transaction metadata store.
2. Make the ack command carry the transaction information.
3. When committing a transaction, commit every subscription in the transaction.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this issue Sep 5, 2020
Master Issue: apache#2664 

Fix https:/streamnative/pulsar/issues/1304

### Motivation

Currently, the consumer can't receive transaction messages.

### Modifications

Support process the commit marker in the topic partition and fetch transaction messages from TransactionBuffer.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this issue Sep 5, 2020
Fix https:/streamnative/pulsar/issues/1307

Master Issue: apache#2664 

### Motivation

Handle acknowledge in the transaction.

### Modifications

1. Register subscription to the transaction metadata store.
2. Make the ack command carry the transaction information.
3. When committing a transaction, commit every subscription in the transaction.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this issue Sep 5, 2020
Master Issue: apache#2664 

Fix https:/streamnative/pulsar/issues/1304

### Motivation

Currently, the consumer can't receive transaction messages.

### Modifications

Support process the commit marker in the topic partition and fetch transaction messages from TransactionBuffer.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this issue Sep 5, 2020
Fix https:/streamnative/pulsar/issues/1307

Master Issue: apache#2664 

### Motivation

Handle acknowledge in the transaction.

### Modifications

1. Register subscription to the transaction metadata store.
2. Make the ack command carry the transaction information.
3. When committing a transaction, commit every subscription in the transaction.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this issue Sep 5, 2020
Master Issue: apache#2664 

Fix https:/streamnative/pulsar/issues/1304

### Motivation

Currently, the consumer can't receive transaction messages.

### Modifications

Support process the commit marker in the topic partition and fetch transaction messages from TransactionBuffer.
lbenc135 pushed a commit to lbenc135/pulsar that referenced this issue Sep 5, 2020
Fix https:/streamnative/pulsar/issues/1307

Master Issue: apache#2664 

### Motivation

Handle acknowledge in the transaction.

### Modifications

1. Register subscription to the transaction metadata store.
2. Make the ack command carry the transaction information.
3. When committing a transaction, commit every subscription in the transaction.
@codelipenghui codelipenghui removed this from the 2.7.0 milestone Nov 19, 2020
@sijie
Copy link
Member

sijie commented Nov 19, 2020

Created a separate issue for tracking the remaining tasks at #8633.

The transaction feature will be released as a developer-preview feature as part of 2.7.0.

@codelipenghui
Copy link
Contributor

Create transaction V1 issue to track the tasks that release at 2.7.0, so move this issue to 2.8.0

@codelipenghui
Copy link
Contributor

Close this issue, #8633 is tracking the remaining tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

No branches or pull requests

5 participants