Skip to content

Commit da00f7b

Browse files
authored
chore: Add v2 support for micro services integration test (#4194)
* chore: Add v2 support for microservices integration test This adds support for v2 storage layer in the microservices integration test. * Skip inconsistent query results with v2 * Add @aleks-p's suggestions * Fix data races * Reduce segment-writer heartbeats * Move the lock up * Check if all service names are available before starting the test
1 parent 2b8e08a commit da00f7b

File tree

7 files changed

+791
-323
lines changed

7 files changed

+791
-323
lines changed

pkg/experiment/metastore/compaction/scheduler/metrics.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ func (c *statsCollector) Collect(ch chan<- prometheus.Metric) {
7777
}
7878

7979
func (c *statsCollector) collectStats(fn func(level int, stats queueStats)) {
80-
c.s.mu.Lock()
81-
defer c.s.mu.Unlock()
82-
8380
for i, q := range c.s.queue.levels {
8481
// Note that some levels may be empty.
8582
if q == nil || q.jobs == nil {
@@ -118,7 +115,10 @@ func (c *statsCollector) collectStats(fn func(level int, stats queueStats)) {
118115
}
119116

120117
func (c *statsCollector) collectMetrics() []prometheus.Metric {
121-
metrics := make([]prometheus.Metric, 0, 8*len(c.s.queue.levels))
118+
c.s.mu.Lock()
119+
defer c.s.mu.Unlock()
120+
121+
var metrics = make([]prometheus.Metric, 0, 8*len(c.s.queue.levels))
122122
c.collectStats(func(l int, stats queueStats) {
123123
level := strconv.Itoa(l)
124124
metrics = append(metrics,

0 commit comments

Comments
 (0)