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

[improve][txn] PIP-160: Pending ack log store enables the batch feature #16707

Merged
merged 9 commits into from
Jul 27, 2022

Conversation

poorbarcode
Copy link
Contributor

@poorbarcode poorbarcode commented Jul 20, 2022

Master Issue: #15370

Motivation

see #15370

Modifications

I will complete proposal #15370 with these pull requests( current pull request is the step-4 ):

  1. Write the batch transaction log handler: TxnLogBufferedWriter
  2. Configuration changes and protocol changes.
  3. Transaction log store enables the batch feature.
  4. Pending ack log store enables the batch feature.
  5. Supports dynamic configuration.
  6. Append admin API for transaction batch log and docs( admin and configuration doc ).
  7. Append metrics support for transaction batch log.

Documentation

  • doc-required

  • doc-not-needed

  • doc

  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jul 20, 2022
@poorbarcode poorbarcode force-pushed the pip/160-9 branch 2 times, most recently from 3630888 to 24375a5 Compare July 20, 2022 19:56
@congbobo184 congbobo184 added area/transaction type/feature The PR added a new feature or issue requested a new feature labels Jul 21, 2022
@congbobo184 congbobo184 added this to the 2.11.0 milestone Jul 21, 2022
@poorbarcode poorbarcode requested a review from congbobo184 July 21, 2022 11:26
@poorbarcode
Copy link
Contributor Author

/pulsarbot run-failure-checks

3 similar comments
@poorbarcode
Copy link
Contributor Author

/pulsarbot run-failure-checks

@poorbarcode
Copy link
Contributor Author

/pulsarbot run-failure-checks

@poorbarcode
Copy link
Contributor Author

/pulsarbot run-failure-checks

@codelipenghui
Copy link
Contributor

@poorbarcode #16727 has merged, could you please use the shared time for this PR?

@poorbarcode
Copy link
Contributor Author

@poorbarcode #16727 has merged, could you please use the shared time for this PR?

Already fixed.

@codelipenghui codelipenghui removed this from the 2.11.0 milestone Jul 26, 2022
@codelipenghui codelipenghui modified the milestones: 2.12.0, 2.11.0 Jul 26, 2022
Copy link
Contributor

@codelipenghui codelipenghui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left some minor comments.

Comment on lines 227 to 228
@Getter
private final ScheduledExecutorService transactionTimer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks unused.

Comment on lines 350 to 351
this.transactionTimer = Executors
.newSingleThreadScheduledExecutor(new DefaultThreadFactory("pulsar-backlog-quota-checker"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks unused.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already remove. Thanks.

buffer.resetReaderIndex();
if (magicNum == BATCHED_ENTRY_DATA_PREFIX_MAGIC_NUMBER){
// skip version
buffer.skipBytes(4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already fixed. Thanks.

}
}).when(pendingAckHandle).completeHandleFuture();
mlPendingAckStoreForRead.replayAsync(pendingAckHandle, internalPinnedExecutor);
Awaitility.await().atMost(200, TimeUnit.SECONDS).until(() -> processController.get() == 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need to wait at most 200 seconds? we don't have too many logs in the pending ack store.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already change to 2 seconds.

@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

1 similar comment
@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@congbobo184 congbobo184 merged commit 4a2286c into apache:master Jul 27, 2022
@poorbarcode poorbarcode deleted the pip/160-9 branch July 27, 2022 04:22
Gleiphir2769 pushed a commit to Gleiphir2769/pulsar that referenced this pull request Aug 4, 2022
…re (apache#16707)

Master Issue: apache#15370

### Motivation

see apache#15370

### Modifications

I will complete proposal apache#15370 with these pull requests( *current pull request is the step-4* ): 

1. Write the batch transaction log handler: `TxnLogBufferedWriter`
2. Configuration changes and protocol changes.
3. Transaction log store enables the batch feature.
4. Pending ack log store enables the batch feature.
5. Supports dynamic configuration.
6. Append admin API for transaction batch log and docs( admin and configuration doc ).
7. Append metrics support for transaction batch log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/transaction doc-not-needed Your PR changes do not impact docs type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants