Closed patriknw closed 1 year ago
Compaction kicks in when a 64K block is filled.
ah, ok. What will happen with the Registered event if there are many TemperatureRead after that, for same entity? We shouldn't loose the registration, right?
No, we shouldn’t lose the registration. Compaction happens by record type.
good, closing
I just want to mention that I have retested compaction, and see the expected result. Reached the 64k limit while having the scala service stopped. Then started scala service and it received the events, with compaction gaps. It filled the gaps as expected.
I tried to test compaction, but there is something I don't understand. I stopped the iot-service-scala, and updated the temperature over 100 times for the same entity. Then I expected that it would only keep the last 10 events. When starting iot-service-scala I still see all TemperatureRead events emitted over grpc and stored in the iot-service-scala db.
By adding
println
inon_event
of the temperature entity I can also see that all events are replayed on startup.