This is an automated email from the ASF dual-hosted git repository. zhouxj pushed a commit to branch feature/GEODE-9838 in repository https://gitbox.apache.org/repos/asf/geode.git
commit 313fb24631ab16157452fc540b70d18a7aa1b10b Author: zhouxh <[email protected]> AuthorDate: Mon Nov 22 15:06:56 2021 -0800 GEODE-9838: Log key info for deserialization issue while index update --- .../cache/query/internal/index/IndexManagerIntegrationTest.java | 9 ++++++--- .../apache/geode/cache/query/internal/index/IndexManager.java | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) 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 4b6624e..7d3f048 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 @@ -142,7 +142,8 @@ public class IndexManagerIntegrationTest { assertThat(indexInvalid.isValid()).isFalse(); LogFileAssert.assertThat(logFile) .contains(String.format( - "Updating the Index %s failed. The index is corrupted and marked as invalid.", + "Updating the Index %s for key " + newKey + + " failed. The index is corrupted and marked as invalid.", indexName)); } @@ -169,7 +170,8 @@ public class IndexManagerIntegrationTest { assertThat(indexInvalid.isValid()).isFalse(); LogFileAssert.assertThat(logFile) .contains(String.format( - "Updating the Index %s failed. The index is corrupted and marked as invalid.", + "Updating the Index %s for key " + existingKey + + " failed. The index is corrupted and marked as invalid.", indexName)); } @@ -211,7 +213,8 @@ public class IndexManagerIntegrationTest { assertThat(indexInvalid.isValid()).isFalse(); LogFileAssert.assertThat(logFile) .contains(String.format( - "Updating the Index %s failed. The index is corrupted and marked as invalid.", + "Updating the Index %s for key " + existingKey + + " failed. The index is corrupted and marked as invalid.", indexName)); } 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 31839f3..1c22ac1 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 @@ -1160,7 +1160,8 @@ public class IndexManager { index.markValid(false); setPRIndexAsInvalid((AbstractIndex) index); logger.warn(String.format( - "Updating the Index %s failed. The index is corrupted and marked as invalid.", + "Updating the Index %s for key " + entry.getKey() + + " failed. The index is corrupted and marked as invalid.", ((AbstractIndex) index).indexName), exception); } } @@ -1172,7 +1173,8 @@ public class IndexManager { index.markValid(false); setPRIndexAsInvalid((AbstractIndex) index); logger.warn(String.format( - "Updating the Index %s failed. The index is corrupted and marked as invalid.", + "Updating the Index %s for key " + entry.getKey() + + " failed. The index is corrupted and marked as invalid.", ((AbstractIndex) index).indexName), exception); } }
