You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2016/07/04 10:43:12 UTC
[GitHub] flink pull request #2183: [FLINK-4123] Cassandra sink checks for exceptions ...
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/2183#discussion_r69440065
--- Diff: flink-streaming-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraTupleWriteAheadSink.java ---
@@ -132,11 +132,15 @@ protected void sendValues(Iterable<IN> values, long timestamp) throws Exception
}
try {
while (updatesSent != updatesConfirmed.get()) {
+ if (exception.get() != null) { // verify that no query failed until now
+ LOG.warn("Sending a value failed.", exception.get());
+ break;
+ }
Thread.sleep(100);
}
--- End diff --
Could we try to replace the busy waiting loop with a wait-notify construct? That would decrease latency and wouldn't burn unnecessary CPU cycles. We could sync on the `updateConfirmed` variable.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---