[SPARK-3686][STREAMING] Wait for sink to commit the channel before check...

...ing for the channel size.