flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2004] Fix memory leak in presence of fa...
Date Thu, 21 May 2015 09:49:00 GMT
Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/674#discussion_r30787324
  
    --- Diff: flink-staging/flink-streaming/flink-streaming-connectors/src/main/java/org/apache/flink/streaming/connectors/kafka/api/persistent/PersistentKafkaSource.java
---
    @@ -225,7 +226,16 @@ public void close() {
     
     	@Override
     	public void restoreState(long[] state) {
    -		// we maintain the offsets in Kafka, so nothing to do.
    +		if(lastOffsets == null) {
    +			LOG.warn("Restore state called before open() has been called");
    +			return;
    +		}
    +		LOG.info("Restoring state to {}", Arrays.toString(state));
    +		if(lastOffsets.length != state.length) {
    --- End diff --
    
    How about sanity checking before logging that things are going to happen? Usually gives
better logging insights...


---
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.
---

Mime
View raw message