This is an automated email from the ASF dual-hosted git repository.

agoncharuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e4a462  IGNITE-12106 Improve exception message for absent binary 
metadata - Fixes #6855.
4e4a462 is described below

commit 4e4a462e1e175248593e101ff924f578483a4c79
Author: Alexey Goncharuk <alexey.goncha...@gmail.com>
AuthorDate: Tue Sep 10 10:41:59 2019 +0300

    IGNITE-12106 Improve exception message for absent binary metadata - Fixes 
#6855.
    
    Signed-off-by: Alexey Goncharuk <alexey.goncha...@gmail.com>
---
 .../java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
index 9d44e3c..1319247 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderExImpl.java
@@ -40,6 +40,7 @@ import 
org.apache.ignite.internal.binary.streams.BinaryInputStream;
 import org.apache.ignite.internal.util.IgniteUtils;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.SB;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -2008,8 +2009,10 @@ public class BinaryReaderExImpl implements BinaryReader, 
BinaryRawReaderEx, Bina
                 BinaryMetadata meta = type != null ? type.metadata() : null;
 
                 if (type == null || meta == null)
-                    throw new BinaryObjectException("Cannot find metadata for 
object with compact footer: " +
-                        typeId);
+                    throw new BinaryObjectException("Cannot find metadata for 
object with compact footer " +
+                        "(Ignite work directory might have been cleared after 
restart. Make sure that IGNITE_HOME " +
+                        "does not point to a temp folder or any other folder 
that is destroyed/cleared on restarts) [" +
+                        "typeId=" + typeId + ", IGNITE_HOME='" + 
U.getIgniteHome() + "']");
 
                 Collection<BinarySchema> existingSchemas = meta.schemas();
 

Reply via email to