Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PersistenceExceptionTypeConsistency when running the program again after previously killing it #365

Open
antacid3 opened this issue Jan 26, 2025 · 1 comment

Comments

@antacid3
Copy link

Environment Details

  • EclipseStore Version: 2.1.1
  • JDK version: openjdk version "21.0.5" 2024-10-15
  • OS: Linux
  • Used frameworks: Spring Boot

Describe the bug

When I kill my program it gives me this when I boot it again

org.eclipse.serializer.persistence.exceptions.PersistenceExceptionTypeConsistency: TypeId inconsistency for ....Record: typeDictionary type definition typeId = 1000074, validated type handler typeId = 1000078
	at org.eclipse.serializer.persistence.types.PersistenceTypeHandlerManager$Default.validateTypeHandler(PersistenceTypeHandlerManager.java:316) ~[persistence-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.types.PersistenceTypeHandlerManager$Default.registerTypeHandler(PersistenceTypeHandlerManager.java:624) ~[persistence-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.types.PersistenceTypeHandlerManager$Default.internalEnsureTypeHandler(PersistenceTypeHandlerManager.java:609) ~[persistence-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.types.PersistenceTypeHandlerManager$Default.ensureTypeHandler(PersistenceTypeHandlerManager.java:377) ~[persistence-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.types.PersistenceTypeHandlerManager$Default.ensureTypeHandler(PersistenceTypeHandlerManager.java:353) ~[persistence-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.registerGuaranteed(BinaryStorer.java:670) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.registerLazyOptional(BinaryStorer.java:685) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.types.PersistenceObjectManager$Default.ensureObjectId(PersistenceObjectManager.java:196) ~[persistence-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.register(BinaryStorer.java:704) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.apply(BinaryStorer.java:343) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.Binary.storeIterableContentAsList(Binary.java:1845) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.Binary.storeIterableAsList(Binary.java:692) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.AbstractBinaryHandlerCustomIterableSimpleListElements.store(AbstractBinaryHandlerCustomIterableSimpleListElements.java:77) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.AbstractBinaryHandlerCustomIterableSimpleListElements.store(AbstractBinaryHandlerCustomIterableSimpleListElements.java:21) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.storeItem(BinaryStorer.java:491) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.processItems(BinaryStorer.java:476) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.internalStore(BinaryStorer.java:459) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.binary.types.BinaryStorer$Default.storeAll(BinaryStorer.java:507) ~[persistence-binary-2.1.1.jar:na]
	at org.eclipse.serializer.persistence.types.PersistenceManager$Default.storeAll(PersistenceManager.java:317) ~[persistence-2.1.1.jar:na]
	at org.eclipse.store.storage.types.StorageConnection.storeAll(StorageConnection.java:411) ~[storage-2.1.1.jar:na]
	at org.eclipse.store.storage.embedded.types.EmbeddedStorageManager$Default.storeRoot(EmbeddedStorageManager.java:194) ~[storage-embedded-2.1.1.jar:na]

To Reproduce

make a program that writes lots using LazyArrayList in batches of 40000
kill the program
try to start it again

Expected behavior

that it keep writing

@hg-ms
Copy link
Contributor

hg-ms commented Jan 27, 2025

Hi,
The exception indicates a mismatch between an already persisted type and the actual type of an object. This may happen due to hot code replacements done by the spring dev tools.
You may try to disable the spring dev tools.
If the error still occurs is would be help full if you could provide a build-able reproduction example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants