Repository navigation
Conversation
The parameter was documented but never passed to the device, which always polled every 30 s. Values <= 0 are rejected like shard-stats-sample-interval. Fixes apache#136
|
Is this solution informed by how Opensearch Benchmarks wires things or is it a novel fix? We might want to consult “upstream” to find out where the solr-port went wrong. |
…s-sample-interval # Conflicts: # tests/worker_coordinator/worker_coordinator_test.py
|
Good question. It's a gap in the port rather than a new design. This PR copies the upstream validation but passes the value at the call site. If you'd rather match OSB exactly, I can pass I also merged main to fix the conflict with the |
|
Yes, let's standardize on passing |
|
Done in 1015b71. |
Description
docs/reference/telemetry.mddocuments--telemetry-params collection-stats-sample-interval:60for the always-on collection stats device. However,_create_solr_telemetry_devicesbuiltSolrCollectionStatswithout asample_interval_s, so the device always polled every 30 s.This PR reads
collection-stats-sample-intervalfrom the telemetry params, with a default of 30, and passes it toSolrCollectionStats. LikeShardStatswithshard-stats-sample-interval,SolrCollectionStatsnow raisesSystemSetupErrorfor values <= 0. Otherwise a zero interval would make_poll_looppoll Solr in a tight loop.Issues Resolved
Fixes #136 (found while looking into #5)
Testing
New functionality includes testing
tests/worker_coordinator/worker_coordinator_test.py::WorkerCoordinatorTests::test_collection_stats_uses_sample_interval_paramsetscollection-stats-sample-interval: 7and checks the created device's interval. Onmainit fails with7 != 30.0.tests/unit/solr/test_telemetry.py::TestSolrCollectionStats::test_rejects_non_positive_sample_intervalchecks that 0 and -5 are rejected.The full
tests/suite passes locally on Python 3.12 (1176 passed, 5 skipped), andruff check .passes. I haven't run the integration suite (it/).This touches the same list in
_create_solr_telemetry_devicesas #135, but different lines, so either can merge first.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.