cloudbreak
cloudbreak copied to clipboard
CB-18126 - cleanup structured events upon deletion for Datalake service
from @sodre90: Resize need to be double checked. @kkalvagadda1 , any thoughts?
@sxxgrc can you please check this as Kalyan is on PTO, maybe it is related to sdx resize, thank you!
@sxxgrc can you please check this as Kalyan is on PTO, maybe it is related to sdx resize, thank you!
Thanks for the request Peter, seeing things like this early helps our team a lot.
Lol nice that takes care of it, I do think we might as well cover the resize recovery case as well.
Here's what we can change it to:
if (lastFlowLog.isPresent()) {
if (flowChainLogService.isFlowTriggeredByFlowChain(DatalakeResizeFlowEventChainFactory.class.getSimpleName(), lastFlowLog.get())) {
eventSenderService.notifyEvent(context, ResourceEvent.DATALAKE_RESIZE_COMPLETE);
} else if (!flowChainLogService.isFlowTriggeredByFlowChain(DatalakeResizeRecoveryFlowEventChainFactory.class.getSimpleName(), lastFlowLog.get())) {
structuredEventCleanUpService.cleanUp(payload.getResourceId());
}
} else {
structuredEventCleanUpService.cleanUp(payload.getResourceId());
}
Or something along these lines. Hopefully that makes sense even if it is a little cluttered, I just wrote the first thing I thought would solve this but it can definitely be cleaned up some more.