Git Product home page Git Product logo

Comments (6)

JRobTS avatar JRobTS commented on September 22, 2024

So it appears that this sometimes works and I traced the reason why it sometimes works:

After a leader election it appears the coordinator is working from a clean slate and is able to delete the older segments. So I guess a side-effect of leader election is that it will delete old segments but while a coordinator holds leadership it will not delete old segments.

from druid.

zachjsh avatar zachjsh commented on September 22, 2024

@JRobTS , thanks for submitting this issue. As I recall, the coordinator should loop around to the older segments that i missed on way up, after it has found no new unused segments for a given later interval. Are you finding this not to be the case? I believe this should happen when the datasource key is removed from the interval map here,

datasourceToLastKillIntervalEnd.remove(dataSource);
. Such should result in the interval for that datasource starting from the beginning of time again.

from druid.

JRobTS avatar JRobTS commented on September 22, 2024

from druid.

zachjsh avatar zachjsh commented on September 22, 2024

@JRobTS The killUnusedSegments duty is tied to the coordinator indexing period (druid.coordinator.period.indexingPeriod), it will not issue kill tasks at a faster rate than the max of that config and druid.coordinator.kill.period. what are these configs set to on your cluster? Can you try lowering this to say 10 minutes as to see if that helps with progress? It seems that in your case newer unused segments are being created at a rate faster than the indexing / kill period.

from druid.

JRobTS avatar JRobTS commented on September 22, 2024

We are using the default indexingPeriod of 30 minutes and we have druid.coordinator.kill.period=PT1H (although the kill actually runs every 1.5 hours, I've logged a separate ticket on that).

Compaction is definitely occurring more frequently than the kill operation but (from a requirements perspective) this shouldn't stop kill from deleting the unused segments created by the dropForever rule. I have set druid.coordinator.kill.maxSegments=10000 but it only gets around 100 or so segments per run.

I will enable continuous auto-kill by removing druid.coordinator.kill.period and monitor.

from druid.

JRobTS avatar JRobTS commented on September 22, 2024

I switched to 10 minute intervals and it is now working; the kill task runs every hour (since I have hourly segments) and picks up both the unused segments from compaction and unused segments from drop rules.

Using the default indexing and kill periods would allow deep storage to grow forever but using a configuration like the following works:

# Enable auto-delete from deep storage
druid.coordinator.kill.on=true
druid.coordinator.kill.period=PT10M
druid.coordinator.kill.durationToRetain=P1D
druid.coordinator.kill.bufferPeriod=PT6H
druid.coordinator.kill.maxSegments=10000
druid.coordinator.period.indexingPeriod=PT10M

I will stress that this works because the kill task runs more frequently than compaction does, which allows the kill job to find nothing and clear the memory map so that subsequent kill jobs can run with full context (include drop rules).

The kill job has to find nothing before it will look for everything. :)

from druid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.