accumulo icon indicating copy to clipboard operation
accumulo copied to clipboard

Fix 4409 by warning once every 15 minutes

Open EdColeman opened this issue 1 year ago • 4 comments

When max files is exceeded but files cannot be found to compact, emit a WARN level message once every fifteen minutes, other wise log at trace. This should prevent flooding the logs and the monitor with a large volume of messages, but still be annoying enough that it draws attention to the problem.

EdColeman avatar Mar 21 '24 14:03 EdColeman

NOTE to reviewers: I am not sure if this will address the problem - it will depend on how often the DefaultCompactionPlanner is instantiated because this fix will only work if a new instances of the Planner is NOT created each run. I wanted to get this up early in case it is sufficient.

EdColeman avatar Mar 21 '24 14:03 EdColeman

I wonder if NanoTime from #4364 should have been merged into 2.1 vs main.

dlmarion avatar Mar 21 '24 15:03 dlmarion

@EdColeman I had worked up a WIP fix for this here https://github.com/keith-turner/accumulo/commit/2877bc9e97e3eb456e4bbebfd858bf9292368fdc . Not sure if it works or is a good approach though. One thing I was trying to do was to reuse code for rate limiting logging. I thnik we have multiple places in the code that do something custom for this, would be good to consolidate the pattern in the code somehow and have one way to do it.

keith-turner avatar Mar 21 '24 15:03 keith-turner

I have no issues with a more general solution. This can be closed if that's the way we want to go. My rational for this narrow PR was that, if the approach is correct then it would be a small patch that others could use quickly.

We may want to use this approach and then, as a follow-on. replace it the more general solution when it is ready?

Either way, it assumes that the instantiation of the DefaultCompactPlanner is suitable for using per-instance local variables to control the log rate. If not, then there is no point to using this PR.

EdColeman avatar Mar 21 '24 16:03 EdColeman