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

queue sometimes creates empty .wal files and fails to initialize when emtpy .was files exist #10

Open
sergeydub opened this issue Aug 14, 2024 · 0 comments

Comments

@sergeydub
Copy link

This is the code that I use to init file queue:

		dataFileQ = FileQueue.<Tsv>batched()
				.folder(QUEUE_FOLDER)
				.restoreFromDisk(true)
				.limit(QueueLimit.<Tsv>queueLength()
						.length(getFileQueueLength())
						.handler(new BiConsumer<Tsv, FileQueue<Tsv>>() {
							
							@Override
							public void accept(Tsv t, FileQueue<Tsv> u) {
								// do nothing for now
							}
						})
						.build())
				.wal(WalFilesConfig.builder()
						.maxCount(getFileQueueWalMaxCount())
						.build())
				.batchSize(getFileQueueBatchSize())
				.build();

This is the exception that I am getting:

14 Aug 2024 11:11:45:271 WARN [com.modius.framework.service.GenericService] - error starting service
java.nio.BufferUnderflowException: null
at java.nio.Buffer.nextGetIndex(Buffer.java:721) ~[?:?]
at java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:498) ~[?:?]
at org.infobip.lib.popout.batched.QueueSerializer.getQueueLength(QueueSerializer.java:78) ~[popout-2.1.1.jar:?]
at org.infobip.lib.popout.batched.BatchedFileQueue.(BatchedFileQueue.java:85) ~[popout-2.1.1.jar:?]
at org.infobip.lib.popout.batched.BatchedFileQueueBuilder.createQueue(BatchedFileQueueBuilder.java:56) ~[popout-2.1.1.jar:?]
at org.infobip.lib.popout.FileQueue$Builder.build(FileQueue.java:298) ~[popout-2.1.1.jar:?]
at com.modius.em.data.Dispatcher.start(Dispatcher.java:178) ~[classes/:?]
at com.modius.em.data.DataProcessorService.doStart(DataProcessorService.java:158) ~[classes/:?]
at com.modius.framework.service.GenericService.start(GenericService.java:66) ~[classes/:?]
at com.modius.framework.service.ServiceManager$ServiceRunner.run(ServiceManager.java:342) ~[classes/:?]
at java.lang.Thread.run(Thread.java:1583) [?:?]

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

1 participant