From 266b7f7b931ff20205b658e41bb6495bbe2e763b Mon Sep 17 00:00:00 2001 From: Zacken1969 Date: Fri, 7 Jan 2022 15:26:00 +0100 Subject: [PATCH 1/2] Fix issue #987 Unnecessary warn deleteTopicRecords --- src/admin/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/index.js b/src/admin/index.js index 022777e39..dce9574bb 100644 --- a/src/admin/index.js +++ b/src/admin/index.js @@ -1078,7 +1078,7 @@ module.exports = ({ low: undefined, } // warn in case of offset below low watermark - if (parseInt(offset) < parseInt(low)) { + if (parseInt(offset) < parseInt(low) && parseInt(offset)!==-1) { logger.warn( 'The requested offset is before the earliest offset maintained on the partition - no records will be deleted from this partition', { From 9cfc276ca6acd2feaf3ac2ee8b70ea3e43076c23 Mon Sep 17 00:00:00 2001 From: Zacken1969 Date: Fri, 7 Jan 2022 15:42:13 +0100 Subject: [PATCH 2/2] Fix Lint --- src/admin/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/index.js b/src/admin/index.js index dce9574bb..f2c6cc21f 100644 --- a/src/admin/index.js +++ b/src/admin/index.js @@ -1078,7 +1078,7 @@ module.exports = ({ low: undefined, } // warn in case of offset below low watermark - if (parseInt(offset) < parseInt(low) && parseInt(offset)!==-1) { + if (parseInt(offset) < parseInt(low) && parseInt(offset) !== -1) { logger.warn( 'The requested offset is before the earliest offset maintained on the partition - no records will be deleted from this partition', {