dcapwell commented on code in PR #4556: URL: https://github.com/apache/cassandra/pull/4556#discussion_r2683927714
########## src/java/org/apache/cassandra/service/writes/thresholds/CoordinatorWriteWarnings.java: ########## @@ -0,0 +1,194 @@ +/* + * 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.cassandra.service.writes.thresholds; + +import java.util.HashMap; +import java.util.Map; +import javax.annotation.Nullable; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.apache.cassandra.db.ColumnFamilyStore; +import org.apache.cassandra.db.DecoratedKey; +import org.apache.cassandra.db.IMutation; +import org.apache.cassandra.db.partitions.PartitionUpdate; +import org.apache.cassandra.schema.Schema; +import org.apache.cassandra.schema.TableId; +import org.apache.cassandra.schema.TableMetadata; +import org.apache.cassandra.service.ClientWarn; +import org.apache.cassandra.utils.Pair; + +import io.netty.util.concurrent.FastThreadLocal; + +/** + * ThreadLocal manager for write warnings at the coordinator. + * Accumulates warnings from multiple write operations in a single client request, + * then sends them to the client and updates metrics. + */ +public class CoordinatorWriteWarnings Review Comment: there is a lot of overlap with `CoordinatorWarnings`, can we refactor so read/write can use 80% the same logic and only the read/write related changes need to be custom? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

