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

KAFKA-15307: Update/errors for deprecated config #14448

Open
wants to merge 19 commits into
base: trunk
Choose a base branch
from

Conversation

Cerchie
Copy link
Contributor

@Cerchie Cerchie commented Sep 25, 2023

This PR is a follow-up on #14360.
It ensures that warnings are shown if the dep'd configs outlined in that PR are used (note topology.optimization's variable has changed rather than the configuration itself; this is already addressed in the code via KIP-626).

Tests have been added to StreamsConfigTest.java to ensure the proper warnings show up.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@Cerchie
Copy link
Contributor Author

Cerchie commented Sep 25, 2023

tagging @mjsax for review

Copy link

This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has merge conflicts, please update it with the latest from trunk (or appropriate release branch)

If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed.

@github-actions github-actions bot added the stale Stale PRs label Dec 25, 2023
@mjsax mjsax removed the stale Stale PRs label Jan 17, 2024
@mjsax
Copy link
Member

mjsax commented Jan 17, 2024

Thanks for the PR. Overall LGTM.

I am just wondering if we should also update the JavaDocs for all deprecated configs? For example:

    /** {@code default.windowed.key.serde.inner} */
    @SuppressWarnings("WeakerAccess")
    @Deprecated
    public static final String DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS = "default.windowed.key.serde.inner";

We could change it to:

    /**
     * {@code default.windowed.key.serde.inner}
     * @deprecation Since X.y.0. Use {@link #WINDOWED_INNER_CLASS_SERDE} instead.
     */
    @SuppressWarnings("WeakerAccess")
    @Deprecated
    public static final String DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS = "default.windowed.key.serde.inner";

Thought? We could do this for all deprecated configs?

@Cerchie
Copy link
Contributor Author

Cerchie commented Feb 22, 2024

Thanks for the PR. Overall LGTM.

I am just wondering if we should also update the JavaDocs for all deprecated configs? For example:

    /** {@code default.windowed.key.serde.inner} */
    @SuppressWarnings("WeakerAccess")
    @Deprecated
    public static final String DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS = "default.windowed.key.serde.inner";

We could change it to:

    /**
     * {@code default.windowed.key.serde.inner}
     * @deprecation Since X.y.0. Use {@link #WINDOWED_INNER_CLASS_SERDE} instead.
     */
    @SuppressWarnings("WeakerAccess")
    @Deprecated
    public static final String DEFAULT_WINDOWED_KEY_SERDE_INNER_CLASS = "default.windowed.key.serde.inner";

Thought? We could do this for all deprecated configs?

went through and addressed all the missing ones I found

@Cerchie Cerchie force-pushed the update/errors-for-deprecated-config branch from e2fab78 to c353eda Compare February 23, 2024 21:50
.github/workflows/codesee-arch-diagram.yml Outdated Show resolved Hide resolved
docs/streams/developer-guide/config-streams.html Outdated Show resolved Hide resolved
docs/streams/developer-guide/config-streams.html Outdated Show resolved Hide resolved
@Cerchie
Copy link
Contributor Author

Cerchie commented Apr 30, 2024

tagging @mjsax in for re-review

@Cerchie Cerchie requested a review from mjsax April 30, 2024 20:52
@mjsax
Copy link
Member

mjsax commented May 16, 2024

@Cerchie -- this PR would need a rebase as #14360 was merged. Also, seems we introduced a few JavaDoc issues (cf #14360 (comment)) that we should fix in this PR.

<td>10485760</td>
</tr>
<tr class="row-even"><td>cache.max.bytes.buffering (Deprecated. Use statestore.cache.max.bytes instead.)</td>
<tr class="row-even"><td>cache.max.bytes.buffering (Deprecated. Use cache.max.bytes instead.)</td>
Copy link
Member

Choose a reason for hiding this comment

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

Seem statestore.cache.max.bytes is correct?

</tr>
<tr class="row-odd"><td>default.windowed.value.serde.inner (Deprecated. Use windowed.inner.class.serde instead.)</td>
<tr class="row-even"><td>default.windowed.key.serde.inner (Deprecated.)</td>

Copy link
Member

Choose a reason for hiding this comment

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

nit: remove empty line

<td><code class="docutils literal"><span class="pre">null</span></code></td>
</tr>
<tr class="row-odd"><td>default.windowed.value.serde.inner (Deprecated. Use windowed.inner.class.serde instead.)</td>
<tr class="row-even"><td>default.windowed.key.serde.inner (Deprecated.)</td>
Copy link
Member

Choose a reason for hiding this comment

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

Seems we don't need this line? It's duplicated above and below?

<tr class="row-odd"><td>default.windowed.value.serde.inner (Deprecated. Use windowed.inner.class.serde instead.)</td>
<tr class="row-even"><td>default.windowed.key.serde.inner (Deprecated.)</td>

<tr class="row-odd"><td>default.windowed.key.serde.inner (Deprecated. Use windowed.inner.class.serde instead.)</td>
Copy link
Member

Choose a reason for hiding this comment

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

duplicated line?

@@ -307,25 +307,23 @@ <h4><a class="toc-backref" href="#id23">num.standby.replicas</a><a class="header
set by the user or all serdes must be passed in explicitly (see also default.key.serde).</td>
<td><code class="docutils literal"><span class="pre">null</span></code></td>
</tr>
<tr class="row-even"><td>default.windowed.key.serde.inner (Deprecated. Use windowed.inner.class.serde instead.)</td>
Copy link
Member

Choose a reason for hiding this comment

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

Why does this PR remove this row in the table?

@@ -500,7 +500,9 @@ public class StreamsConfig extends AbstractConfig {
private static final String BUILT_IN_METRICS_VERSION_DOC = "Version of the built-in metrics to use.";

/** {@code cache.max.bytes.buffering}

Copy link
Member

Choose a reason for hiding this comment

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

nit: about unnecessary empty lines (same right below)

@@ -658,7 +660,7 @@ public class StreamsConfig extends AbstractConfig {
public static final String METRICS_SAMPLE_WINDOW_MS_CONFIG = CommonClientConfigs.METRICS_SAMPLE_WINDOW_MS_CONFIG;

/** {@code auto.include.jmx.reporter}
* @deprecated and will be removed in 4.0.0 */
* @deprecated and will removed in 4.0.0 Users should instead include org.apache.kafka.common.metrics.JmxReporter in metric.reporters in order to enable the JmxReporter.} */
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @deprecated and will removed in 4.0.0 Users should instead include org.apache.kafka.common.metrics.JmxReporter in metric.reporters in order to enable the JmxReporter.} */
* @deprecated and be will removed in 4.0.0; include {@link org.apache.kafka.common.metrics.JmxReporter} via config {@code metric.reporters} in order to enable the JmxReporter. */

@@ -261,10 +261,10 @@ <h4><a class="toc-backref" href="#id23">num.standby.replicas</a><a class="header
</tr>
<tr class="row-odd"><td>statestore.cache.max.bytes</td>
<td>Medium</td>
<td colspan="2">Maximum number of memory bytes to be used for record caches across all threads.</td>
<td colspan="2">Maximum number of memory bytes to be used for record caches across all threads. Note that at the debug level you can use <code>cache.size</code> to monitor the actual size of the Kafka Streams cache.</td>
Copy link
Member

Choose a reason for hiding this comment

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

Not clear to me, what the added sentence means? Are you referring to JMX metrics?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants