This message was deleted.
# general
s
This message was deleted.
a
I looked at the code. The sink framework calls
write(record)
which each sink implements. When this method throws an exception, the Exception Total metric is increased. The JDBC, for some reason, has another method, which is called in a separate thread, which does flushes to the DB - the actual writes to the DB. The flush method is the one that has that exception you mentioned, and it seems that this exception is caught and simply printed to the log.
a
@Asaf Mesika That seems odd, is this something I should throw an issue in for you think?
a
@Neng any idea
n
just did some check: 1. Jthe the
JDBCSink
doesn’t have access to the stats object to report exceptions 2. it actually has a method in the
BaseContext
object for report some user defined metrics: https://github.com/apache/pulsar/blob/master/pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/BaseContext.java#L194 In summary, I think this is a bug needs to be fixed to provide accurate insights regarding exceptions.