upstream: fixed remaining compilation errors

This commit is contained in:
Pratik Patil 2025-05-02 10:43:52 +05:30
parent f47516d51f
commit ff753eed8b
No known key found for this signature in database
GPG key ID: AFDCA496554874B3
4 changed files with 4 additions and 31 deletions

View file

@ -18,7 +18,6 @@
package memorydb package memorydb
import ( import (
"bytes"
"errors" "errors"
"sort" "sort"
"strings" "strings"
@ -131,20 +130,6 @@ func (db *Database) Delete(key []byte) error {
return nil return nil
} }
// DeleteRange deletes all of the keys (and values) in the range [start,end)
// (inclusive on start, exclusive on end).
func (db *Database) DeleteRange(start, end []byte) error {
it := db.NewIterator(nil, start)
defer it.Release()
for it.Next() && bytes.Compare(end, it.Key()) > 0 {
if err := db.Delete(it.Key()); err != nil {
return err
}
}
return nil
}
// DeleteRange deletes all of the keys (and values) in the range [start,end) // DeleteRange deletes all of the keys (and values) in the range [start,end)
// (inclusive on start, exclusive on end). // (inclusive on start, exclusive on end).
func (db *Database) DeleteRange(start, end []byte) error { func (db *Database) DeleteRange(start, end []byte) error {

View file

@ -44,7 +44,7 @@ func NewExecutionPool(initialSize int, timeout time.Duration, service string, re
sp.executionPool.Store(workerpool.New(initialSize)) sp.executionPool.Store(workerpool.New(initialSize))
if metrics.Enabled && report { if metrics.Enabled() && report {
go sp.reportMetrics(3 * time.Second) go sp.reportMetrics(3 * time.Second)
} }
@ -117,8 +117,8 @@ func (s *SafePool) Stop() {
// regarding the execution pool. // regarding the execution pool.
func (s *SafePool) reportMetrics(refresh time.Duration) { func (s *SafePool) reportMetrics(refresh time.Duration) {
var ( var (
epWorkerCountGuage metrics.Gauge epWorkerCountGuage *metrics.Gauge
epWaitingQueueGuage metrics.Gauge epWaitingQueueGuage *metrics.Gauge
epProcessedRequestsHistogram metrics.Histogram epProcessedRequestsHistogram metrics.Histogram
) )

View file

@ -50,7 +50,7 @@ func updateServeTimeHistogram(method string, success bool, elapsed time.Duration
metrics.GetOrRegisterHistogramLazy(h, nil, sampler).Update(elapsed.Nanoseconds()) metrics.GetOrRegisterHistogramLazy(h, nil, sampler).Update(elapsed.Nanoseconds())
} }
func newEpMetrics(service string) (metrics.Gauge, metrics.Gauge, metrics.Histogram) { func newEpMetrics(service string) (*metrics.Gauge, *metrics.Gauge, metrics.Histogram) {
epWorkerCount := fmt.Sprintf("rpc/ep/workers/%s", service) epWorkerCount := fmt.Sprintf("rpc/ep/workers/%s", service)
epWaitingQueue := fmt.Sprintf("rpc/ep/queue/%s", service) epWaitingQueue := fmt.Sprintf("rpc/ep/queue/%s", service)
epProcessedRequests := fmt.Sprintf("rpc/ep/processed/%s", service) epProcessedRequests := fmt.Sprintf("rpc/ep/processed/%s", service)

View file

@ -104,15 +104,3 @@ func FuzzG2SubgroupChecks(f *testing.F) {
fuzzG2SubgroupChecks(data) fuzzG2SubgroupChecks(data)
}) })
} }
func FuzzG2Mul(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
fuzz(blsG2Mul, data)
})
}
func FuzzG1Mul(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
fuzz(blsG1Mul, data)
})
}