Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed lag between file-sd and dns-sd #933

Merged
merged 1 commit into from Mar 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/thanos/query.go
Expand Up @@ -355,6 +355,7 @@ func runQuery(
}
fileSDCache.Update(update)
stores.Update(ctxUpdate)
dnsProvider.Resolve(ctxUpdate, append(fileSDCache.Addresses(), storeAddrs...))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good but what happens if there are no file SD targets configured? We'd still have to wait, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another one done every X minutes below (:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not fixing general lag I guess, this PR fixes just the lag of FileSD vs dns.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I only gave a quick glance and I haven't noticed that, and I thought we were fixing a different kind of problem.

Copy link
Member Author

@jojohappy jojohappy Mar 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not fixing general lag I guess, this PR fixes just the lag of FileSD vs dns.

@bwplotka Could you explain what is the general lag?

It's bit hacky

Agree with you. I think it is a simple way to resolve the issue, and I don't find the general lag that you said.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, by general lag I meant the time between each DNS refresh (that is configured by flag). It's kind of flag as we don't watch for changes (as for DNS it's impossible), we poll every X seconds.

case <-ctxUpdate.Done():
return nil
}
Expand Down