Skip to content

KAFKA-2571: KafkaLog4jAppender dies while specifying acks config#231

Closed
SinghAsDev wants to merge 1 commit into
apache:trunkfrom
SinghAsDev:KAFKA-2571
Closed

KAFKA-2571: KafkaLog4jAppender dies while specifying acks config#231
SinghAsDev wants to merge 1 commit into
apache:trunkfrom
SinghAsDev:KAFKA-2571

Conversation

@SinghAsDev

Copy link
Copy Markdown
Contributor

No description provided.

@SinghAsDev SinghAsDev changed the title KafkaLog4jAppender dies while specifying acks config KAFKA-2571: KafkaLog4jAppender dies while specifying acks config Sep 22, 2015
@asfbot

asfbot commented Sep 22, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #489 FAILURE
Looks like there's a problem with this pull request

@SinghAsDev

Copy link
Copy Markdown
Contributor Author

The failure is due to an aclTest failure, which is not related to changes in this PR.

@SinghAsDev

Copy link
Copy Markdown
Contributor Author

@gwenshap @guozhangwang mind taking a look at this trivial patch. I am adding ducktape tests for KafkaLog4jAppender in KAFKA-2531.

@asfbot

asfbot commented Sep 22, 2015

Copy link
Copy Markdown

kafka-trunk-git-pr #490 SUCCESS
This pull request looks good

@asfgit asfgit closed this in 18d3701 Sep 25, 2015
jsancio pushed a commit to jsancio/kafka that referenced this pull request Aug 6, 2019
wyuka pushed a commit to wyuka/kafka that referenced this pull request Jan 21, 2022
…hreads and fetcher threads (apache#231)

* [LI-HOTFIX] Consolidate the interactions between the RequestHandler threads and fetcher threads

TICKET = LIKAFKA-39536
LI_DESCRIPTION =
In the current code base, the request handler threads need to sync with each fetcher thread
multiple times during the processing of a LeaderAndIsr request, using the
AddPartitions, RemovePartitions, and GetPartitionsCount events.
Each event may be delayed up to request.timeout.ms, i.e. 300s as configured in our clusters.

This PR tries to mitigate the problem by consolidating the multiple events into one
single event ModifyPartitionsAndGetCount for the processing of a LeaderAndIsr request.
Processing of the StopReplica requests has also been migrated to use the
ModifyPartitionsAndGetCount event.

Besides this code change, I also plan to test a reduced value of request timeout
for the fetcher use case.

EXIT_CRITERIA = When this change gets merged in upstream
wyuka pushed a commit to wyuka/kafka that referenced this pull request Jan 21, 2022
…the RequestHandler threads and fetcher threads (apache#231)" (apache#243)

This reverts commit a34a489.
During certification, we found that this change is not safe.
For example, suppose follower 0 is currently fetching data for partition tp0 from leader 1,
and we are trying to switch the leadership to leader 2.

In the previous implementation, tp0 goes through the following steps
1. tp0 is removed from the fetcher targeting leader 1,
2. retrieving the fetch offset based on the new leader's epoch. Say leader 2 returns a fetch offset of 100.
3. tp0 is added to a new fetcher thread with the fetch offset of 100.

After the PR, the following race condition may happen
1. tp0 retrieves the fetch offset, e.g. 100, from leader 2
2. tp0 is concurrently sent for removal from the fetcher-with-leader-1
   and add to the fetcher-with-leader-2 with a fetch offset of 100.

Before the removal from fetcher-with-leader-1 is processed, more data may
possibly be retrieved from leader 1 and appended to the log (e.g. making the log end offset to become 102).
Then the fetch offset, i.e. 100, would not match the log end offset, i.e. 102.
davide-armand pushed a commit to aiven/kafka that referenced this pull request Dec 1, 2025
jeqo added a commit to aiven/kafka that referenced this pull request Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants