Skip to content

Conversation

DuncanSands
Copy link

Don't use the WARNING log level for situations that can occur perfectly normally, as WARNING messages are transmitted all the way to the client (i.e. are costly).
In my case I have lots of tables with types that aren't yet understood by
decoderbufs. These tables aren't being monitored, but because logical decoding
works on the level of the entire database, not just the tables monitored, rows
from them are still reaching decoderbufs, generating vast numbers of warnings
"Encountered unknown typid..."
Likewise, I have many unmonitored materialized views. Every row deleted when
doing a concurrent refresh generates the warning
"...no PK is present..."
These warnings cause two types of trouble when they hit the debezium postgres
connector: a memory leak and increased CPU usage. The memory leak is because
the JDBC layer carefully preserves these warnings in a list, and the list is
never being cleared (this should be fixed in the connector). As for the CPU
usage, I don't fully understand why the processing time increases so much.
It's normal that it should double, as there are twice as many packets to
process (one warning for every row), but it seems to take way more than twice
as long.

…ly normally,

as WARNING messages are transmitted all the way to the client (i.e. are costly).
In my case I have lots of tables with types that aren't yet understood by
decoderbufs.  These tables aren't being monitored, but because logical decoding
works on the level of the entire database, not just the tables monitored, rows
from them are still reaching decoderbufs, generating vast numbers of warnings
  "Encountered unknown typid..."
Likewise, I have many unmonitored materialized views.  Every row deleted when
doing a concurrent refresh generates the warning
  "...no PK is present..."
These warnings cause two types of trouble when they hit the debezium postgres
connector: a memory leak and increased CPU usage.  The memory leak is because
the JDBC layer carefully preserves these warnings in a list, and the list is
never being cleared (this should be fixed in the connector).  As for the CPU
usage, I don't fully understand why the processing time increases so much.
It's normal that it should double, as there are twice as many packets to
process (one warning for every row), but it seems to take way more than twice
as long.
@rhauch
Copy link
Member

rhauch commented Jun 2, 2017

@DuncanSands thanks for filing a JIRA and for submitting this PR.

These warnings cause two types of trouble when they hit the debezium postgres
connector: a memory leak and increased CPU usage. The memory leak is because
the JDBC layer carefully preserves these warnings in a list, and the list is
never being cleared (this should be fixed in the connector)

Would you mind logging an issue for this?

Copy link
Member

@rhauch rhauch left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you!

@rhauch rhauch merged commit d08a755 into debezium:master Jun 2, 2017
@DuncanSands
Copy link
Author

DuncanSands commented Jun 4, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants