Factual / skuld

Distributed task tracking system.
300 stars 13 forks source link

Prevent claims to follower vnodes #79

Closed eric closed 10 years ago

eric commented 10 years ago

If a vnode has recently lost its leadership, the node queue may have IDs that are no longer relevant.

This adds a check to skip any task that belongs to a vnode where this node isn't the leader.

This is intended to fix #73.

aphyr commented 10 years ago

This will help, but it won't fix the underlying problem: upstream consumers may take a task ID from the queue which is valid, the vnode may shut down, and that ID will subsequently be invalid. Those consumers need to retry in that case.

eric commented 10 years ago

Yeah, you're right about that — I think that I'm going to follow-up with something that just quiets down the exception logging for exceptions we know are going to happen.

Part of the problem was that early on I was getting concerned about all of these exceptions in the logs before I realized they are all part of normal operation.