issues
search
childe
/
gohangout
使用 golang 模仿的 Logstash。用于消费 Kafka 数据,处理后写入 ES、Clickhouse 等。
MIT License
1.01k
stars
234
forks
source link
Fix es action type
#163
Closed
yangyimincn
closed
2 years ago
yangyimincn
commented
2 years ago
修复es action类型为create时导致的panic
yangyimincn
commented
2 years ago
当action为create时,会引发panic:
| gohangout version 1.7.5
| panic: interface conversion: interface {} is nil, not map[string]interface {}
|
| goroutine 46 [running]:
| github.com/childe/gohangout/output.esGetRetryEvents(0xc00a4ee000, 0xc00a79c000, 0x120310, 0x1ffe00, 0xc003376110, 0x1ffe00, 0x0, 0x0, 0xc0006a6a00, 0x0, ...)
| /tmp/gohangout-1.7.5/output/elasticsearch_output.go:155 +0xa9f
| github.com/childe/gohangout/output.(*HTTPBulkProcessor).tryOneBulk(0xc0013420c0, 0xc004754150, 0x30, 0xc003376110, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
| /tmp/gohangout-1.7.5/output/bulk_http.go:254 +0x8b5
| github.com/childe/gohangout/output.(*HTTPBulkProcessor).innerBulk(0xc0013420c0, 0xc003376110)
| /tmp/gohangout-1.7.5/output/bulk_http.go:166 +0x3d5
| github.com/childe/gohangout/output.NewHTTPBulkProcessor.func1(0xc0013420c0)
| /tmp/gohangout-1.7.5/output/bulk_http.go:102 +0xad
| created by github.com/childe/gohangout/output.NewHTTPBulkProcessor
| /tmp/gohangout-1.7.5/output/bulk_http.go:95 +0x2b4
修复es action类型为create时导致的panic