Skip to content

Commit e357fe1

Browse files
committed
use ConvertToRoot in processor.Spawn
1 parent 0109238 commit e357fe1

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ require (
161161
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
162162
)
163163

164-
replace github.com/ozontech/insane-json => github.com/HeadHunter483/insane-json v0.0.0-20251020115930-22ac733527f5
164+
replace github.com/ozontech/insane-json => github.com/HeadHunter483/insane-json v0.0.0-20251222100647-bd6913edc51e

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
22
github.com/ClickHouse/ch-go v0.65.1 h1:SLuxmLl5Mjj44/XbINsK2HFvzqup0s6rwKLFH347ZhU=
33
github.com/ClickHouse/ch-go v0.65.1/go.mod h1:bsodgURwmrkvkBe5jw1qnGDgyITsYErfONKAHn05nv4=
4-
github.com/HeadHunter483/insane-json v0.0.0-20251020115930-22ac733527f5 h1:+H5kKZdH98PKdba2EqhS4fi214/s1oGG4kxxwCqb144=
5-
github.com/HeadHunter483/insane-json v0.0.0-20251020115930-22ac733527f5/go.mod h1:xZLf3tVLOqaT13rn1sv4fYaZfupAXNL9naLz4QRoMfY=
4+
github.com/HeadHunter483/insane-json v0.0.0-20251222100647-bd6913edc51e h1:g+u3Q4nLiUNLchYXio+YbwSvxW0MHHjCXRSyiBCSOxM=
5+
github.com/HeadHunter483/insane-json v0.0.0-20251222100647-bd6913edc51e/go.mod h1:xZLf3tVLOqaT13rn1sv4fYaZfupAXNL9naLz4QRoMfY=
66
github.com/KimMachineGun/automemlimit v0.2.6 h1:tQFriVTcIteUkV5EgU9iz03eDY36T8JU5RAjP2r6Kt0=
77
github.com/KimMachineGun/automemlimit v0.2.6/go.mod h1:pJhTW/nWJMj6SnWSU2TEKSlCaM+1N5Mej+IfS/5/Ol0=
88
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=

pipeline/pipeline.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ func (p *Pipeline) finalize(event *Event, notifyInput bool, backEvent bool) {
667667
}
668668

669669
for i, e := range event.children {
670-
insaneJSON.Release(e.Root)
670+
e.Root = nil
671671
event.children[i] = nil
672672
}
673673

pipeline/processor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,11 +436,11 @@ func (p *processor) Spawn(parent *Event, nodes []*insaneJSON.Node) {
436436
// we can't reuse parent event (using insaneJSON.Root{Node: child}
437437
// because of nil decoder
438438
child := &Event{
439-
Root: insaneJSON.Spawn(),
439+
Root: nil,
440440
SourceName: parent.SourceName,
441441
}
442442
parent.children = append(parent.children, child)
443-
child.Root.CopyFromNode(child.Root, node)
443+
child.Root = node.ConvertToRoot(parent.Root)
444444
child.SetChildKind()
445445
child.action = nextActionIdx
446446

0 commit comments

Comments
 (0)