OAK-8718: LuceneIndexStatsUpdateCallback is slow and synchronous whic…
…h leads to slowness
+1 LGTM
I'd do the review a bit later... But had a general comment - would it be useful to have an interface that's used to store stats. There can then a NOOP implementation which does nothing. A working one which is essentially things extracted from current patch.
On the same lines, I think the decision to record stats it not could also be extracted out into that class. That's probably be quite helpful in testing if the implemention is recording stats correctly.
On the thought about testing, it'd easier to use a Clock object. Setting Clock.VIRTUAL would allow to test "update only if time has elapsed" behaviour.
This PR is stale because it has been open 24 months with no activity. Remove stale label or comment or this will be closed in 30 days.