NXCALS-6728 Deadlock in compactor while stopping app
Merge request template
COMPATIBILITY NOTE
Please make sure that this change is BACKWARDS COMPATIBLE and a new server will work correctly with clients using old APIs versions.
It may be that data sent in the new format will break the old clients.
In case of any potential incompatibility we have to inform our clients and schedule release & deployment with them.
@acc-logging-team - please have a look for approval.
Moving leader election after Spring startup. Has to lazy init Spark session to avoid locking too much resources on yarn for the instances waiting for leadership.
Closes NXCALS-6728