8000 Lock File mechanism does not create lock file during first storage start · Issue #281 · eclipse-store/store · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Lock File mechanism does not create lock file during first storage start #281

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

Closed
fh-ms opened this issue Sep 6, 2024 · 0 comments · Fixed by #282
Closed

Lock File mechanism does not create lock file during first storage start #281

fh-ms opened this issue Sep 6, 2024 · 0 comments · Fixed by #282
Assignees
Labels
bug Something isn't working
Milestone

Comments

@fh-ms
Copy link
Contributor
fh-ms commented Sep 6, 2024

Lock File mechanism does not create lock file during first storage start

I Just follow this page:
https://docs.eclipsestore.io/manual/storage/configuration/lock-file.html

Create a storage provider with lock:

public class LockingFeatureTest
{

    @TempDir
    Path workDir;

    String data = "some data";

    //https://docs.eclipsestore.io/manual/storage/configuration/lock-file.html
    @Test
    void lockingFeature()
    {
        try (EmbeddedStorageManager storageManager = EmbeddedStorage.Foundation(workDir)
                .setLockFileSetupProvider(Storage.LockFileSetupProvider())
                .start(data);
        )
        {
        }
    }

}

Raise error message:

org.eclipse.store.storage.exceptions.StorageExceptionIoReading
	at org.eclipse.store.storage.types.StorageFile$Abstract.writeBytes(StorageFile.java:236)
	at org.eclipse.store.storage.types.StorageLockFileManager$Default.writeLockFileData(StorageLockFileManager.java:453)
	at org.eclipse.store.storage.types.StorageLockFileManager$Default.initialize(StorageLockFileManager.java:377)
	at org.eclipse.store.storage.types.StorageLockFileManager$Default.ensureInitialized(StorageLockFileManager.java:184)
	at org.eclipse.store.storage.types.StorageLockFileManager$Default.start(StorageLockFileManager.java:140)
	at org.eclipse.store.storage.types.StorageLockFileManager$Default.start(StorageLockFileManager.java:65)
	at org.eclipse.store.storage.types.StorageSystem$Default.initializeLockFileManager(StorageSystem.java:393)
	at org.eclipse.store.storage.types.StorageSystem$Default.internalStartUp(StorageSystem.java:502)
	at org.eclipse.store.storage.types.StorageSystem$Default.start(StorageSystem.java:602)
	at org.eclipse.store.storage.types.StorageSystem$Default.start(StorageSystem.java:72)
	at org.eclipse.store.storage.embedded.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:247)
	at org.eclipse.store.storage.embedded.types.EmbeddedStorageManager$Default.start(EmbeddedStorageManager.java:95)
	at org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation.start(EmbeddedStorageFoundation.java:234)
	at test.microstream.various.LockingFeatureTest.lockingFeature(LockingFeatureTest.java:25)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: org.eclipse.store.storage.exceptions.StorageException
	at org.eclipse.store.storage.types.StorageFile$Abstract.internalOpenWriting(StorageFile.java:433)
	at org.eclipse.store.storage.types.StorageFile$Abstract.ensureWritable(StorageFile.java:390)
	at org.eclipse.store.storage.types.StorageFile$Abstract.writeBytes(StorageFile.java:232)
	... 20 more
Caused by: org.eclipse.serializer.exceptions.IORuntimeException: java.nio.file.NoSuchFileException: /var/folders/qg/gm8jbx191c96ffg187zt7wwh0000gn/T/junit10015694122394599299/used.lock
	at org.eclipse.store.afs.nio.types.NioFileWrapper$Abstract.openChannel(NioFileWrapper.java:259)
	at org.eclipse.store.afs.nio.types.NioFileWrapper$Abstract.openChannel(NioFileWrapper.java:234)
	at org.eclipse.store.afs.nio.types.NioIoHandler$Default.specificOpenWriting(NioIoHandler.java:304)
	at org.eclipse.store.afs.nio.types.NioIoHandler$Default.specificOpenWriting(NioIoHandler.java:81)
	at org.eclipse.serializer.afs.types.AIoHandler$Abstract.openWriting(AIoHandler.java:630)
	at org.eclipse.serializer.afs.types.AWritableFile.open(AWritableFile.java:27)
	at org.eclipse.store.storage.types.StorageFile$Abstract.internalOpenWriting(StorageFile.java:429)
	... 22 more
Caused by: java.nio.file.NoSuchFileException: /var/folders/qg/gm8jbx191c96ffg187zt7wwh0000gn/T/junit10015694122394599299/used.lock
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:181)
	at java.base/java.nio.channels.FileChannel.open(FileChannel.java:298)
	at java.base/java.nio.channels.FileChannel.open(FileChannel.java:357)
	at org.eclipse.serializer.io.XIO.openFileChannel(XIO.java:605)
	at org.eclipse.store.afs.nio.types.NioFileWrapper$Abstract.openChannel(NioFileWrapper.java:254)
	... 28 more
@fh-ms fh-ms added the bug Something isn't working label Sep 6, 2024
@fh-ms fh-ms added this to the 1.x milestone Sep 6, 2024
@fh-ms fh-ms self-assigned this Sep 6, 2024
@fh-ms fh-ms linked a pull request Sep 6, 2024 that will close this issue
@fh-ms fh-ms closed this as completed in #282 Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0