You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by zh...@apache.org on 2021/11/23 17:55:36 UTC
[geode] branch support/1.13 updated: GEODE-9838: Log key info for deserialization issue while index update (#7136)
This is an automated email from the ASF dual-hosted git repository.
zhouxj pushed a commit to branch support/1.13
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/support/1.13 by this push:
new a6c458d GEODE-9838: Log key info for deserialization issue while index update (#7136)
a6c458d is described below
commit a6c458d4f435c77794d9a0a83e308ffca51f9fc3
Author: Xiaojian Zhou <ge...@users.noreply.github.com>
AuthorDate: Tue Nov 23 09:22:19 2021 -0800
GEODE-9838: Log key info for deserialization issue while index update (#7136)
(cherry picked from commit f56d60a6227fc46fbf3e8f3f5ba48d8be453e69e)
---
.../cache/query/internal/index/IndexManagerIntegrationTest.java | 6 +++++-
.../org/apache/geode/cache/query/internal/index/IndexManager.java | 2 ++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexManagerIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexManagerIntegrationTest.java
index 346049c..de8b384 100644
--- a/geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexManagerIntegrationTest.java
+++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexManagerIntegrationTest.java
@@ -70,7 +70,8 @@ public class IndexManagerIntegrationTest {
TestQueryObject.throwException = false;
logFile = temporaryFolder.newFile(testName.getMethodName() + ".log");
- serverStarterRule.withProperty("log-file", logFile.getAbsolutePath()).startServer();
+ serverStarterRule.withProperty("log-file", logFile.getAbsolutePath())
+ .withProperty("log-level", "debug").startServer();
internalCache = serverStarterRule.getCache();
}
@@ -143,6 +144,7 @@ public class IndexManagerIntegrationTest {
.contains(String.format(
"Updating the Index %s failed. The index is corrupted and marked as invalid.",
indexName));
+ LogFileAssert.assertThat(logFile).contains("Corrupted key is " + newKey);
}
@Test
@@ -170,6 +172,7 @@ public class IndexManagerIntegrationTest {
.contains(String.format(
"Updating the Index %s failed. The index is corrupted and marked as invalid.",
indexName));
+ LogFileAssert.assertThat(logFile).contains("Corrupted key is " + existingKey);
}
@Test
@@ -212,6 +215,7 @@ public class IndexManagerIntegrationTest {
.contains(String.format(
"Updating the Index %s failed. The index is corrupted and marked as invalid.",
indexName));
+ LogFileAssert.assertThat(logFile).contains("Corrupted key is " + existingKey);
}
private static class TestQueryObject implements Serializable {
diff --git a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
index fa8db50..7fbfe17 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java
@@ -1157,6 +1157,7 @@ public class IndexManager {
logger.warn(String.format(
"Updating the Index %s failed. The index is corrupted and marked as invalid.",
((AbstractIndex) index).indexName), exception);
+ logger.debug("Corrupted key is " + entry.getKey());
}
}
@@ -1169,6 +1170,7 @@ public class IndexManager {
logger.warn(String.format(
"Updating the Index %s failed. The index is corrupted and marked as invalid.",
((AbstractIndex) index).indexName), exception);
+ logger.debug("Corrupted key is " + entry.getKey());
}
}