Vishnu, Ashok | #2180 | using max of last modified time for completed or deactivated for query not to break for inconsistent data