You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
We are facing this intermittent issue where on a multi-object serialization(pretty large - Think of this as say a database serialization to JSON), at random places and for random objects the file contains NUL(0x00) for some writes. the content before and after are fine.
Please note that this is highly intermittent and we are not able to root cause the issue. Following are more details
val mapper = new jacksonObjectMapper()
.registerModule(ParameterNamesModule())
.registerModule(JavaTimeModule())
.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.NON_PRIVATE)
.setVisibility(PropertyAccessor.CREATOR, JsonAutoDetect.Visibility.ANY)
val file = new File("test.json")
val generator = objectMapper.factory.createGenerator(file.outputStream())
// all the entities, we call
generator.writeObject(entity) // These entities are Kotlin data classes.
We do have a parallel write use case where multiple threads write to same json generator - by synchronized at the writing function level.
Questions
Is the access pattern correct?
Is there any known issues of random NUL writes happening?
Concurrent writes are supported? If not @synchronized should serialize writes, I supopose.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
We are facing this intermittent issue where on a multi-object serialization(pretty large - Think of this as say a database serialization to JSON), at random places and for random objects the file contains NUL(0x00) for some writes. the content before and after are fine.
Please note that this is highly intermittent and we are not able to root cause the issue. Following are more details
We do have a parallel write use case where multiple threads write to same json generator - by synchronized at the writing function level.
Questions
Beta Was this translation helpful? Give feedback.
All reactions