Skip to content

Commit a81478d

Browse files
committed
Merge branch 'feature/prometheus-by-indexname'
2 parents 0c900e3 + c9764a5 commit a81478d

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

elasticsearch/bulk/bulk.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ type Bulk struct {
4949
batchTicker *time.Ticker
5050
isClosed chan bool
5151
esClient *elasticsearch.Client
52-
batch []BatchItem
53-
typeName []byte
5452
readers []*bytes.MultiDimensionReader
53+
typeName []byte
54+
batch []BatchItem
5555
batchIndex int
5656
batchSize int
5757
batchSizeLimit int
@@ -60,7 +60,6 @@ type Bulk struct {
6060
batchByteSize int
6161
concurrentRequest int
6262
flushLock sync.Mutex
63-
pqCDC *cdc.Connector
6463
}
6564

6665
type BatchItem struct {

elasticsearch/bulk/metric.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ type Metric interface {
2020
var hostname, _ = os.Hostname()
2121

2222
type metric struct {
23-
slotName string
24-
pqCDC cdc.Connector
25-
23+
pqCDC cdc.Connector
2624
processLatencyMs prometheus.Gauge
2725
bulkRequestProcessLatencyMs prometheus.Gauge
28-
29-
totalIndex map[string]prometheus.Counter
30-
totalDelete map[string]prometheus.Counter
26+
totalIndex map[string]prometheus.Counter
27+
totalDelete map[string]prometheus.Counter
28+
slotName string
3129
}
3230

3331
func NewMetric(pqCDC cdc.Connector, slotName string) Metric {

0 commit comments

Comments
 (0)