v.20.5Improvement

Keep DistributedFilesToInsert Metric Value on Exceptions

Keep the value of DistributedFilesToInsert metric on exceptions. In previous versions, the value was set when we are going to send some files, but it is zero, if there was an exception and some files are still pending. Now it corresponds to the number of pending files in filesystem. #11220 (alexey-milovidov).
Improved accuracy of the DistributedFilesToInsert metric during exceptions by reflecting the actual number of pending files in the filesystem.

Why it matters

Previously, the DistributedFilesToInsert metric was reset to zero when an exception occurred, even if there were files still pending for insertion. This update ensures the metric correctly shows the number of pending files, providing better visibility into distributed insert operations and aiding in monitoring and troubleshooting.

How to use it

No user action is required to enable this improvement. The DistributedFilesToInsert metric now automatically reflects the pending files count even when exceptions occur during distributed inserts.