Skip to content

MINOR: cherry pick KAFKA-13973 to 3.5#14592

Closed
cadonna wants to merge 2 commits intoapache:3.5from
cadonna:cherry-pick_KAFKA-13973_to_3.5
Closed

MINOR: cherry pick KAFKA-13973 to 3.5#14592
cadonna wants to merge 2 commits intoapache:3.5from
cadonna:cherry-pick_KAFKA-13973_to_3.5

Conversation

@cadonna
Copy link
Member

@cadonna cadonna commented Oct 19, 2023

Cherry-pick of

Committer Checklist (excluded from commit message)

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

bachmanity1 and others added 2 commits October 19, 2023 17:38
…csRecorderGaugesTest (apache#14190)

Reviewers: Christo Lolov <christololov@gmail.com>, Divij Vaidya <diviv@amazon.com>
All block cache metrics are being multiplied by the total number of
column families. In a `RocksDBTimestampedStore`, we have 2 column
families (the default, and the timestamped values), which causes all
block cache metrics in these stores to become doubled.

The cause is that our metrics recorder uses `getAggregatedLongProperty`
to fetch block cache metrics. `getAggregatedLongProperty` queries the
property on each column family in the database, and sums the results.

Since we always configure all column families to share the same block
cache, that causes the same block cache to be queried multiple times for
its metrics, with the results added togehter, effectively multiplying
the real value by the total number of column families.

To fix this, we should simply use `getLongProperty`, which queries a
single column family (the default one). Since all column families share
the same block cache, querying just one of them will give us the correct
metrics for that shared block cache.

Note: the same block cache is shared among all column families of a store
irrespective of whether the user has configured a shared block cache
across multiple stores.

Reviewers: Matthias J. Sax <matthias@confluent.io>, Bruno Cadonna <cadonna@apache.org>
@mjsax mjsax added the streams label Oct 19, 2023
@mjsax
Copy link
Member

mjsax commented Oct 19, 2023

Seems there is some issue on 3.5 branch?

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:169:9: Invalid literal number

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:295:9: Invalid literal number

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:370:9: Invalid literal number

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:437:9: Invalid literal number

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:499:9: Invalid literal number

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:176:5: ')' expected but '}' found.

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:305:5: ')' expected but '}' found.

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:385:5: ')' expected but '}' found.

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:449:5: ')' expected but '}' found.

[Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-14592/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala:525:5: ')' expected but '}' found.

10 errors found



> Task :core:compileTestScala FAILED

@cadonna
Copy link
Member Author

cadonna commented Oct 20, 2023

This seems to be a scala issue. With scala 2.13 is compiles with 2.12 it does not.

@cadonna
Copy link
Member Author

cadonna commented Oct 20, 2023

OK, I found the issue. On trunk, it was fixed by #14126.

@cadonna
Copy link
Member Author

cadonna commented Oct 20, 2023

I cherry picked the commits of the following PRs directly to 3.5:

Cherry-picking directly seemed cleaner to me.

@cadonna cadonna closed this Oct 20, 2023
@mjsax
Copy link
Member

mjsax commented Oct 20, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants