You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "swuferhong (via GitHub)" <gi...@apache.org> on 2026/06/23 05:58:25 UTC
[PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
swuferhong opened a new pull request, #3511:
URL: https://github.com/apache/fluss/pull/3511
<!--
*Thank you very much for contributing to Fluss - we are happy that you want to help us improve Fluss. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/fluss/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no issue.
- Name the pull request in the format "[component] Title of the pull request", where *[component]* should be replaced by the name of the component being changed. Typically, this corresponds to the component label assigned to the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are unsure about which is the best component.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes.
- Each pull request should address only one issue, not mix up code from multiple issues.
- **Generative AI disclosure:** Indicate whether generative AI tools were used in authoring this PR. If yes, specify the tool below.
- [ ] No generative AI tools used
- [ ] Yes (please specify the tool below)
**(The sections below can be removed for hotfixes or typos)**
-->
<!--
Generated-by: [Tool Name and Version] following [the guidelines](https://github.com/apache/fluss/blob/main/AGENTS.md)
-->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #3510
<!-- What is the purpose of the change -->
During hourly partition rotation, clients holding stale partition IDs repeatedly trigger
ZooKeeper lookups that always return "not found". This adds unnecessary pressure on ZK.
The negative cache eliminates these redundant queries by remembering the "not found" result
for a configurable TTL period.
### Brief change log
<!-- Please describe the changes made in this pull request and explain how they address the issue -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3511:
URL: https://github.com/apache/fluss/pull/3511#discussion_r3533531721
##########
fluss-server/src/main/java/org/apache/fluss/server/RpcServiceBase.java:
##########
@@ -674,4 +699,15 @@ protected MetadataResponse processMetadataRequest(
return buildMetadataResponse(
coordinatorServer, aliveTabletServers, tablesMetadata, partitionsMetadata);
}
+
+ private boolean isPartitionAssignmentMissingFromZk(long partitionId) {
+ try {
+ return !zkClient.getPartitionAssignment(partitionId).isPresent();
+ } catch (Exception e) {
+ throw new FlussRuntimeException(
+ String.format(
+ "Failed to get partition assignment for partition %d.", partitionId),
+ e);
+ }
Review Comment:
`isPartitionAssignmentMissingFromZk` currently turns a partition-ID miss into a hard failure if `zkClient.getPartitionAssignment(partitionId)` throws. That introduces a new failure mode for `MetadataRequest` (previously this path would still throw `PartitionNotExistException`) and can surface transient ZooKeeper issues to clients as a server-side error. Since this lookup is only used to decide whether to populate the negative cache, failures should skip caching and preserve the original `PartitionNotExistException` behavior.
##########
fluss-server/src/main/java/org/apache/fluss/server/RpcServiceBase.java:
##########
@@ -164,9 +167,15 @@ public RpcServiceBase(
this.metadataManager = metadataManager;
this.authorizer = authorizer;
this.dynamicConfigManager = dynamicConfigManager;
+ this.partitionNegativeCache = new PartitionNegativeCache();
this.ioExecutor = ioExecutor;
Review Comment:
PR description states the negative-cache TTL is configurable, but the coordinator/tablet services always instantiate `new PartitionNegativeCache()` with hard-coded defaults (10 minutes / 10,000 entries). Without wiring this to server configuration (e.g., `ConfigOptions`/dynamic config), operators cannot tune TTL/size to match their partition rotation and request patterns.
##########
fluss-server/src/main/java/org/apache/fluss/server/metadata/PartitionNegativeCache.java:
##########
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.fluss.server.metadata;
+
+import org.apache.fluss.annotation.VisibleForTesting;
+import org.apache.fluss.shaded.guava32.com.google.common.base.Ticker;
+import org.apache.fluss.shaded.guava32.com.google.common.cache.Cache;
+import org.apache.fluss.shaded.guava32.com.google.common.cache.CacheBuilder;
+import org.apache.fluss.utils.clock.Clock;
+import org.apache.fluss.utils.clock.SystemClock;
+
+import javax.annotation.concurrent.ThreadSafe;
+
+import java.time.Duration;
+
+/**
+ * A thread-safe negative cache for partition IDs that are known to not exist in ZooKeeper.
+ *
+ * <p>This cache helps reduce ZooKeeper pressure when clients repeatedly request metadata for
+ * partitions that have been deleted (e.g., during hourly partition rotation). Instead of querying
+ * ZK every time, we cache the "not exist" result and return it directly.
+ *
+ * <p>The cache uses access-time-based TTL: entries are evicted after a configurable duration of no
+ * access. As long as clients keep asking for the same non-existent partition, the cache entry stays
+ * alive and protects ZK.
+ */
+@ThreadSafe
+public class PartitionNegativeCache {
+
+ /** Default TTL for negative cache entries: 10 minutes of no access. */
+ private static final Duration DEFAULT_TTL = Duration.ofMinutes(10);
+
+ /** Default maximum number of negative cache entries. */
+ private static final long DEFAULT_MAXIMUM_SIZE = 10_000L;
+
+ private final Cache<Long, Boolean> cache;
+
+ public PartitionNegativeCache() {
+ this(DEFAULT_TTL, DEFAULT_MAXIMUM_SIZE);
+ }
+
+ public PartitionNegativeCache(Duration ttl, long maximumSize) {
+ this(ttl, maximumSize, SystemClock.getInstance());
+ }
+
+ @VisibleForTesting
+ PartitionNegativeCache(Duration ttl, long maximumSize, Clock clock) {
+ if (ttl.isZero() || ttl.isNegative()) {
+ throw new IllegalArgumentException("TTL must be positive.");
+ }
+ if (maximumSize <= 0) {
+ throw new IllegalArgumentException("Maximum size must be positive.");
+ }
+ this.cache =
+ CacheBuilder.newBuilder()
+ .maximumSize(maximumSize)
+ .expireAfterAccess(ttl)
+ .ticker(
+ new Ticker() {
+ @Override
+ public long read() {
+ return clock.nanoseconds();
+ }
+ })
+ .build();
+ }
+
+ /**
+ * Checks if the given partition ID is known to not exist.
+ *
+ * <p>If the entry exists and is not expired, Guava refreshes its access time and this method
+ * returns {@code true}. If the entry is expired or doesn't exist, returns {@code false}.
+ *
+ * @param partitionId the partition ID to check
+ * @return {@code true} if the partition is known to not exist, {@code false} otherwise
+ */
+ public boolean isKnownNonExistent(long partitionId) {
+ return cache.getIfPresent(partitionId) != null;
+ }
+
+ /**
+ * Marks the given partition ID as known to not exist. The entry will remain in the cache until
+ * it hasn't been accessed for the configured TTL duration or the bounded cache evicts it.
+ *
+ * @param partitionId the partition ID to mark as non-existent
+ */
+ public void markNonExistent(long partitionId) {
+ cache.put(partitionId, Boolean.TRUE);
+ }
+
+ /**
+ * Marks the given partition ID as existing by removing any stale negative-cache entry.
+ *
+ * @param partitionId the partition ID to mark as existent
+ */
+ public void markExistent(long partitionId) {
+ cache.invalidate(partitionId);
+ }
+
+ /**
+ * Returns the current number of entries in the cache. Includes potentially expired entries that
+ * haven't been cleaned up yet.
+ */
Review Comment:
The `size()` javadoc says the count includes expired entries that haven't been cleaned up yet, but the implementation always calls `cache.cleanUp()` before returning `cache.size()`. This is misleading for callers/tests relying on `size()` semantics.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on code in PR #3511:
URL: https://github.com/apache/fluss/pull/3511#discussion_r3491857633
##########
fluss-server/src/main/java/org/apache/fluss/server/RpcServiceBase.java:
##########
@@ -634,6 +651,12 @@ protected MetadataResponse processMetadataRequest(
if (partitionIdAndPaths.containsKey(partitionId)) {
partitionPaths.add(partitionIdAndPaths.get(partitionId));
} else {
+ // Only cache when the authoritative partition assignment is also gone. A miss
+ // from the scoped table-path lookup may simply mean that the request omitted
+ // the owning table or the session is not authorized for it.
+ if (isPartitionAssignmentMissingFromZk(partitionId)) {
Review Comment:
Thanks for the comment. `partitionIdsNotExistsInCache` indeed does not include IDs already hit by the negative cache.
The extra `isPartitionAssignmentMissingFromZk(partitionId)` check is still needed before markNonExistent, because `getPartitionIdAndPaths(authorizedTables)` is scoped by the requested/authorized table paths. A miss there may mean the partition belongs to another table or is not visible in this request scope, rather than globally non-existent.
I addressed the mirror case by invalidating stale negative-cache entries when we confirm the partition exists:
metadata cache hit: call `partitionNegativeCache.markExistent(partitionId)`
ZK partitionIdAndPaths hit: call `partitionNegativeCache.markExistent(partitionId)`
This keeps the negative cache effective for real non-existent partitions while avoiding stale negative entries blocking existing partitions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on code in PR #3511:
URL: https://github.com/apache/fluss/pull/3511#discussion_r3458960225
##########
fluss-server/src/main/java/org/apache/fluss/server/RpcServiceBase.java:
##########
@@ -614,6 +623,15 @@ protected MetadataResponse processMetadataRequest(
long[] partitionIds = request.getPartitionsIds();
List<Long> partitionIdsNotExistsInCache = new ArrayList<>();
for (long partitionId : partitionIds) {
+ // Fast-path: throw immediately for partition IDs known to not exist,
Review Comment:
I think negative cache check should NOT be placed before metadata cache lookup.
Problem scenario — a race condition exists:
1. A new partition is being created; its ID has been assigned.
2. A client sends a metadata request, but the server's metadata cache hasn't synced yet, and ZK may not have the entry written yet either.
3. Server queries ZK, finds nothing → calls markNonExistent(partitionId).
4. Partition creation completes; metadata cache is updated via ZK watch.
5. Subsequent requests are blocked by the negative cache and can never retrieve the now-existing partition.
Suggested fix: Move the negative cache check to after the metadata cache lookup but before the ZK query:
##########
fluss-server/src/main/java/org/apache/fluss/server/metadata/PartitionNegativeCache.java:
##########
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.fluss.server.metadata;
+
+import org.apache.fluss.annotation.VisibleForTesting;
+import org.apache.fluss.utils.clock.Clock;
+import org.apache.fluss.utils.clock.SystemClock;
+
+import javax.annotation.concurrent.ThreadSafe;
+
+import java.time.Duration;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * A thread-safe negative cache for partition IDs that are known to not exist in ZooKeeper.
+ *
+ * <p>This cache helps reduce ZooKeeper pressure when clients repeatedly request metadata for
+ * partitions that have been deleted (e.g., during hourly partition rotation). Instead of querying
+ * ZK every time, we cache the "not exist" result and return it directly.
+ *
+ * <p>The cache uses access-time-based TTL: entries are evicted after a configurable duration of no
+ * access. As long as clients keep asking for the same non-existent partition, the cache entry stays
+ * alive and protects ZK.
+ */
+@ThreadSafe
+public class PartitionNegativeCache {
+
+ /** Default TTL for negative cache entries: 10 minutes of no access. */
+ private static final Duration DEFAULT_TTL = Duration.ofMinutes(10);
+
+ /**
+ * Cleanup interval: only run eviction check when at least this many milliseconds have passed
+ * since the last cleanup.
+ */
+ private static final long CLEANUP_INTERVAL_MS = 60_000;
+
+ private final ConcurrentHashMap<Long, Long> cache;
Review Comment:
Why not useUse Guava Cache but implementation by yourself?
1. **Unreliable expiration cleanup** — maybeCleanup() is only called inside markNonExistent(). If no new partitions are marked as non-existent for a long time (in practice, markNonExistent is only triggered after a ZK query confirms non-existence), expired entries will linger in memory indefinitely. While isKnownNonExistent() lazily removes individual expired entries, it never performs a full sweep.
2. **The project already has shaded Guava, so you can use it directly**:
```java
import org.apache.fluss.shaded.guava32.com.google.common.cache.Cache;
import org.apache.fluss.shaded.guava32.com.google.common.cache.CacheBuilder;
private final Cache<Long, Boolean> negativeCache = CacheBuilder.newBuilder()
.expireAfterAccess(10, TimeUnit.MINUTES)
.maximumSize(10000) // prevent OOM in extreme cases
.build();
```
3. Advantages of Guava Cache:
* Automatic eviction: access-time-based TTL without manual maintenance
* Bounded size: maximumSize prevents unbounded growth (the current implementation has no size limit)
* Battle-tested thread safety: no need to roll your own CAS logic
@wuchong ,WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on PR #3511:
URL: https://github.com/apache/fluss/pull/3511#issuecomment-4828177095
Hi, @loserwang1024 Could you take another look?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong merged PR #3511:
URL: https://github.com/apache/fluss/pull/3511
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on code in PR #3511:
URL: https://github.com/apache/fluss/pull/3511#discussion_r3490296468
##########
fluss-server/src/main/java/org/apache/fluss/server/RpcServiceBase.java:
##########
@@ -634,6 +651,12 @@ protected MetadataResponse processMetadataRequest(
if (partitionIdAndPaths.containsKey(partitionId)) {
partitionPaths.add(partitionIdAndPaths.get(partitionId));
} else {
+ // Only cache when the authoritative partition assignment is also gone. A miss
+ // from the scoped table-path lookup may simply mean that the request omitted
+ // the owning table or the session is not authorized for it.
+ if (isPartitionAssignmentMissingFromZk(partitionId)) {
Review Comment:
Look good to me, only one mirror problem: whether partitionId in partitionIdsNotExistsInCache is included in partitionNegativeCache? If not, this is no need. Maybe this can move blew `partitionIdAndPaths = zkClient.getPartitionIdAndPaths(authorizedTables)` for each existed partitionIdAndPaths.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on PR #3511:
URL: https://github.com/apache/fluss/pull/3511#issuecomment-4785460081
@loserwang1024 comments addressed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong commented on code in PR #3511:
URL: https://github.com/apache/fluss/pull/3511#discussion_r3536565274
##########
fluss-server/src/main/java/org/apache/fluss/server/metadata/PartitionNegativeCache.java:
##########
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.fluss.server.metadata;
+
+import org.apache.fluss.annotation.VisibleForTesting;
+import org.apache.fluss.shaded.guava32.com.google.common.base.Ticker;
+import org.apache.fluss.shaded.guava32.com.google.common.cache.Cache;
Review Comment:
Use `com.github.benmanes.caffeine.cache.Cache` instead, which has better performance. Server-side consistently uses caffeine cache, e.g., `PartialUpdateCache`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on code in PR #3511:
URL: https://github.com/apache/fluss/pull/3511#discussion_r3464078584
##########
fluss-server/src/main/java/org/apache/fluss/server/metadata/PartitionNegativeCache.java:
##########
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.fluss.server.metadata;
+
+import org.apache.fluss.annotation.VisibleForTesting;
+import org.apache.fluss.utils.clock.Clock;
+import org.apache.fluss.utils.clock.SystemClock;
+
+import javax.annotation.concurrent.ThreadSafe;
+
+import java.time.Duration;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * A thread-safe negative cache for partition IDs that are known to not exist in ZooKeeper.
+ *
+ * <p>This cache helps reduce ZooKeeper pressure when clients repeatedly request metadata for
+ * partitions that have been deleted (e.g., during hourly partition rotation). Instead of querying
+ * ZK every time, we cache the "not exist" result and return it directly.
+ *
+ * <p>The cache uses access-time-based TTL: entries are evicted after a configurable duration of no
+ * access. As long as clients keep asking for the same non-existent partition, the cache entry stays
+ * alive and protects ZK.
+ */
+@ThreadSafe
+public class PartitionNegativeCache {
+
+ /** Default TTL for negative cache entries: 10 minutes of no access. */
+ private static final Duration DEFAULT_TTL = Duration.ofMinutes(10);
+
+ /**
+ * Cleanup interval: only run eviction check when at least this many milliseconds have passed
+ * since the last cleanup.
+ */
+ private static final long CLEANUP_INTERVAL_MS = 60_000;
+
+ private final ConcurrentHashMap<Long, Long> cache;
Review Comment:
I have changed it to guava cache
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on PR #3511:
URL: https://github.com/apache/fluss/pull/3511#issuecomment-4910980937
@wuchong comments addressed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on code in PR #3511:
URL: https://github.com/apache/fluss/pull/3511#discussion_r3535830797
##########
fluss-server/src/main/java/org/apache/fluss/server/RpcServiceBase.java:
##########
@@ -164,9 +167,15 @@ public RpcServiceBase(
this.metadataManager = metadataManager;
this.authorizer = authorizer;
this.dynamicConfigManager = dynamicConfigManager;
+ this.partitionNegativeCache = new PartitionNegativeCache();
this.ioExecutor = ioExecutor;
Review Comment:
This option feels a bit too detailed to expose as a public server configuration at this stage, and the current defaults should be sufficient for the intended use case. We can revisit making it configurable later if we see real operational needs around different partition rotation or request patterns.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [server] Add negative cache for non-existent partition IDs in metadata requests [fluss]
Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on PR #3511:
URL: https://github.com/apache/fluss/pull/3511#issuecomment-4904035816
@wuchong copliot's comments addressed. PTAL, thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org