-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Replace Timeouts for Sources #3031
Conversation
airbyte-workers/src/main/java/io/airbyte/workers/WorkerUtils.java
Outdated
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/WorkerUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful!
airbyte-workers/src/main/java/io/airbyte/workers/WorkerUtils.java
Outdated
Show resolved
Hide resolved
airbyte-workers/src/main/java/io/airbyte/workers/WorkerUtils.java
Outdated
Show resolved
Hide resolved
@@ -82,6 +94,7 @@ public void start(StandardTapConfig input, Path jobRoot) throws Exception { | |||
LineGobbler.gobble(tapProcess.getErrorStream(), LOGGER::error); | |||
|
|||
messageIterator = streamFactory.create(IOs.newBufferedReader(tapProcess.getInputStream())) | |||
.peek(message -> heartbeatMonitor.beat()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
airbyte-workers/src/main/java/io/airbyte/workers/protocols/airbyte/HeartbeatMonitor.java
Outdated
Show resolved
Hide resolved
this.heartBeatFreshMagnitude = heartBeatFreshMagnitude; | ||
this.heartBeatFreshTimeUnit = heartBeatFreshTimeUnit; | ||
this.instantSupplier = instantSupplier; | ||
this.lastBeat = new AtomicReference<>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't initialize it to now
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my inclination is that if beat
has never been called it is more intuitive that isBeating
returns false. if we initialize this to now
then for the period between now
and becoming stale, the monitor will incorrectly say that beating is happening.
airbyte-workers/src/main/java/io/airbyte/workers/WorkerUtils.java
Outdated
Show resolved
Hide resolved
a5ea507
to
e544b3e
Compare
e544b3e
to
106cb8a
Compare
What
How
Follow up
Thought Process
Anyway, I think this solves the problem as it is reported now, so I think we should move forward with this. Then based on future complaints around timeouts and heart beating we can decide if we want to introduce a more invasive approach where connectors are responsible for doing their own heart beating and / or adding heartbeat messages to the protocol.