Closed NPCRUS closed 4 years ago
Same problem
Hello guys. I'm trying to implement some inserting to clickhouse app using you library.
chStream = ch.query('INSERT INTO megas.xovis_events', { format: 'JSONEachRow' }) chStream.on('error', err => { console.log(err) this.nackAll() chStream.end() }) chStream.on('end', e => { this.ackAll() console.log('100 batch insertion done ' + new Date()) }) chStream.write(message) chStream.end()
So after I end stream manually 'end' event has not being fired for some reason. Do you have any ideas? I can provide any additional info you need.
Switched back my clickhouse-server to 18.14.14 (dockerized) - got my INSERT events again! Driver version is 1.6.0.
@NPCRUS @alexeymkh @cheburakha Can you please provide more info about you environment, CH version and running code?
I'll try to reproduce and investigate this problem
There was two different issues.
.on('data', fn)
handler.
The 'end' event will not be emitted unless the data is completely consumed.
v19.3
and fixed in @apla/clickhouse@1.6.3
Hello guys. I'm trying to implement some inserting to clickhouse app using you library.
So after I end stream manually 'end' event has not being fired for some reason. Do you have any ideas? I can provide any additional info you need.