Re: [DISCUSS] KIP-1026: Handling producer snapshot when upgrading from < v2.8.0 for Tiered Storage

2024-03-17 Thread Arpit Goyal
>
>
>>  In summary , There are two possible solution to handle the above
scenario when producer snapshot file found to be null

1. *Generate empty producer snapshot file at run time when copying
LogSegment*


   - This will not require any backward compatibility dependencies with the
   plugin.
   - It preserves the contract i.e producerSnapshot files should be
   mandatory.
   - We could have a metric which helps us to assess how many times empty
   snapshot files have been created.

2.*  Make producerSnapshot files optional *

   - This would break the contract with the plugin and would require
   defining a set of approaches to handle it which is mentioned earlier in the
   thread.
   - If we make producer Snapshot optional , We would   not be  handling
   the error which @LukeChen mentioned when producerSnapshot
   accidentally deleted a given segment. But this holds true for
   TransactionalIndex.
   - The other question is do we really need to make the field optional.
   The only case where this problem can occur is only when the topic migrated
   from < 2.8 version.


[jira] [Created] (KAFKA-16381) We should use a lock to protect the config getter in KafkaMetric

2024-03-17 Thread Johnny Hsu (Jira)
Johnny Hsu created KAFKA-16381:
--

 Summary: We should use a lock to protect the config getter in 
KafkaMetric
 Key: KAFKA-16381
 URL: https://issues.apache.org/jira/browse/KAFKA-16381
 Project: Kafka
  Issue Type: Bug
Reporter: Johnny Hsu
Assignee: Johnny Hsu


In KafkaMetirc.java, the getter is 

```
@Override
public MetricName metricName() {
return this.metricName;
}
```

and there is a setter 

```
public void config(MetricConfig config) {
    synchronized (lock) {
    this.config = config;
  }
}
```

Since it's possible to set and get in the mean time, we should have lock in the 
getter as well



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[VOTE] KIP-932: Queues for Kafka

2024-03-17 Thread Andrew Schofield
Hi,
I’ve been working to complete KIP-932 over the past few months and discussions 
have quietened down.

I’d like to open the voting for KIP-932:

https://cwiki.apache.org/confluence/display/KAFKA/KIP-932%3A+Queues+for+Kafka

Thanks,
Andrew

[jira] [Resolved] (KAFKA-16376) Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric

2024-03-17 Thread Chia-Ping Tsai (Jira)


 [ 
https://issues.apache.org/jira/browse/KAFKA-16376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chia-Ping Tsai resolved KAFKA-16376.

Resolution: Duplicate

> Fix flaky ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric
> ---
>
> Key: KAFKA-16376
> URL: https://issues.apache.org/jira/browse/KAFKA-16376
> Project: Kafka
>  Issue Type: Bug
>Reporter: Chia-Ping Tsai
>Assignee: PoAn Yang
>Priority: Major
>
> {quote}
> [2024-03-13T17:22:47.835Z] > Task :core:test
> [2024-03-13T17:22:47.835Z] 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric() failed, 
> log available in 
> /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-15474/core/build/reports/testOutput/kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric().test.stdout
> [2024-03-13T17:22:47.835Z] 
> [2024-03-13T17:22:49.409Z] Gradle Test Run :core:test > Gradle Test Executor 
> 97 > ReplicaManagerTest > testRemoteFetchExpiresPerSecMetric() FAILED
> [2024-03-13T17:22:49.409Z] org.opentest4j.AssertionFailedError: The 
> ExpiresPerSec value is not incremented. Current value is: 0
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
> [2024-03-13T17:22:49.409Z] at 
> org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
> [2024-03-13T17:22:49.409Z] at 
> kafka.server.ReplicaManagerTest.testRemoteFetchExpiresPerSecMetric(ReplicaManagerTest.scala:4174)
> {quote}
> https://ci-builds.apache.org/blue/rest/organizations/jenkins/pipelines/Kafka/pipelines/kafka-pr/branches/PR-15474/runs/12/nodes/9/steps/88/log/?start=0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


Re: [DISCUSS] KIP-1020: Deprecate `window.size.ms` in `StreamsConfig`

2024-03-17 Thread Sophie Blee-Goldman
Sounds good!

@Lucia when you have a moment can you update the KIP with
the new proposal, including the details that Matthias pointed
out in his last response? After that's done I think you can go
ahead and call for a vote whenever you're ready!

On Sat, Mar 16, 2024 at 7:35 PM Matthias J. Sax  wrote:

> Thanks for the summary. Sounds right to me. That is what I would propose.
>
> As you pointed out, we of course still need to support the current
> confis, and we should log a warning when in use (even if the new one is
> in use IMHO) -- but that's more an implementation detail.
>
> I agree that the new config should take preference in case both are
> specified. This should be pointed out in the KIP, as it's an important
> contract the user needs to understand.
>
>
> -Matthias
>
> On 3/14/24 6:18 PM, Sophie Blee-Goldman wrote:
> >>
> >> Should we change it do `.serializer` and `.deserialize`?
> >
> > That's a good point -- if we're going to split this up by defining the
> > config
> > in both the TimeWindowedSerializer and TimeWindowedDeserializer,
> > then it makes perfect sense to go a step further and actually define
> > only the relevant de/serializer class instead of the full serde
> >
> > Just to put this all together, it sounds like the proposal is to:
> >
> > 1) Deprecate both these configs where they appear in StreamsConfig
> > (as per the original plan in the KIP, just reiterating it here)
> >
> > 2) Don't "define" either config in any specific client's Config class,
> > but just define a String variable with the config name in the relevant
> > de/serializer class, and maybe point people to it in the docs somewhere
> >
> > 3) We would add three new public String variables for three different
> > configs across two classes, specifically:
> >
> > In TimeWindowedSerializer:
> >- define a constant for "windowed.inner.serializer.class"
> > In TimeWindowedDeserializer:
> >- define a constant for "windowed.inner.deserializer.class"
> >- define a constant for "window.size.ms"
> >
> > 4) Lastly, we would update the windowed de/serializer implementations
> > to check for the new configs (ie "windowed.inner.de/serializer.class")
> > and use the provided de/serializer class, if one was given. If the new
> > configs are not present, they would fall back to the original/current
> > logic (ie that based on the old "windowed.inner.serde.class" config)
> >
> > I think that's everything. Does this sound about right for where we want
> > to go with these configs?
> >
> > On Thu, Mar 14, 2024 at 4:58 PM Matthias J. Sax 
> wrote:
> >
>  By "don't add them" do you just mean we would not have any actual
>  variables defined anywhere for these configs (eg WINDOW_SIZE_MS)
>  and simply document -- somewhere -- that one can use the string
>  "window.size.ms" when configuring a command-line client with a
>  windowed serde?
> >>
> >> Yes. That's the idea.
> >>
> >>
> >>
> >>> I assume you aren't proposing
>  to remove the ability to use and understand this config from the
>  implementations themselves, but correct me if that's wrong.
> >>
> >> No, that would effectively break what we fixed with the original KIP :)
> >>
> >>
> >>
>  Are there any other configs in similar situations that we could look
>  to for precedent?
> >>
> >> Not aware of any others, either.
> >>
> >>
> >>
>  If these are truly the first/only of their kind, I would vote to just
> >> stick
>  them in the appropriate class. As for which class to put them in, I
>  think I'm convinced that "window.size.ms" should only go in the
>  TimeWindowedDeserializer rather than sticking them both in the
>  TimeWindowedSerde as I originally suggested. However, I would
>  even go a step further and not place the "inner.window.class.serde"
>  in the TimeWindowedSerde class either. To me, it actually makes
>  the most sense to define it in both the TimeWindowedSerializer
>  and the TimeWindowedDeserializer.
> >>
> >> Not sure either. What you propose is fine with me. However, I am
> >> wondering about the config names... Why is it `serde` for this case?
> >> Should we change it do `.serializer` and `.deserialize`?
> >>
> >>
> >>
> >> -Matthias
> >>
> >>
> >> On 3/13/24 8:19 PM, Sophie Blee-Goldman wrote:
> >>> By "don't add them" do you just mean we would not have any actual
> >>> variables defined anywhere for these configs (eg WINDOW_SIZE_MS)
> >>> and simply document -- somewhere -- that one can use the string
> >>> "window.size.ms" when configuring a command-line client with a
> >>> windowed serde? Or something else? I assume you aren't proposing
> >>> to remove the ability to use and understand this config from the
> >>> implementations themselves, but correct me if that's wrong.
> >>>
> >>> Are there any other configs in similar situations that we could look
> >>> to for precedent? I personally am not aware of any but by definition
> >>> I suppose these would be hard to discover unles