ClickHouse/ch-go

Cancel streaming insert?

Closed this issue · 2 comments

I've tested https://github.com/ClickHouse/ch-go#stream-data and I see that if I terminate the program in the middle of the block loop, data written so far appear server side.

Is there a way to change this? Maybe a server setting to cancel query if connection is broken?

Thanks,

I think that it is server-side and we can't change it.

To cancel streaming insert, use io.EOF, but data that was already sent can be persisted by server.

Probably this can be changed by some kind of transactions, but I'm not aware of status of ACID in ClickHouse.