0 votes
asked in MicroStream for Java by (1k points)

Right now I am stuck with the following exception, everytime I start my application for the second time:

Exception in thread "main" Exception in thread "MicroStream-StorageChannel-2" one.microstream.storage.exceptions.StorageExceptionDisruptingExceptions: Disrupting Exceptions:

/home/fred/microstream-datastore/channel_3/channel_3_1.dat@2434+-2152 -> backup/channel_3/channel_3_1.dat

/home/fred/microstream-datastore/channel_0/channel_0_1.dat[340] <-> backup/channel_0/channel_0_1.dat[2476]

/home/fred/microstream-datastore/channel_1/channel_1_1.dat@17900+-15890 -> backup/channel_1/channel_1_1.dat

/home/fred/microstream-datastore/channel_2/channel_2_1.dat@2604+-2304 -> backup/channel_2/channel_2_1.dat

...

Caused by: one.microstream.storage.exceptions.StorageExceptionBackupInconsistentFileLength: /home/fred/microstream-datastore/channel_0/channel_0_1.dat[340] <-> backup/channel_0/channel_0_1.dat[2476]

Part of my code is:

storageManager = Configuration.Default().setBaseDirectoryInUserHome(datastorePath)

.setBackupDirectory(backupPath).setChannelCount(4).createEmbeddedStorageFoundation()

.createEmbeddedStorageManager();

I am pretty sure I did something basic wrong and will give it another try tomorrow. But maybe you have a tip for me ;) My next step will be deactivating the backup strategy.

Regards

2 Answers

0 votes
answered by (1k points)
OK I could fix the exception by using a full backup path url.
+1 vote
answered by (350 points)

Hello Fred

just a hint.

I created a new package dbstorage and inside a new class dbhandler (strictly like it was explained in the first workshop)
inside this class I have following code, which defines the behavior of the storage itself:


[code]

public class dbHandler
{

    private final static dataRoot               root = new dataRoot();
    private final static EmbeddedStorageManager storageManager;
   
    static
    {
        storageManager = Configuration.Default()
            .setBaseDirectory("C:/RC_MS_WS/FinMgmtBasic/database")
            .setBackupDirectory("C:/RC_MS_WS/FinMgmtBasic/databaseBck")
            .createEmbeddedStorageFoundation()
            .setRoot(dbHandler.root)
            .createEmbeddedStorageManager(dbHandler.root)
            .start();

        // Lazy References timeout after 10 minutes without access
        LazyReferenceManager.set(LazyReferenceManager.New(
            Duration.ofMinutes(10).toMillis()).start());
       
    }
   
    public static dataRoot getRoot()
    {
        return dbHandler.root;
    }
   
    public static EmbeddedStorageManager getStoragemanager()
    {
        return dbHandler.storageManager;
    }

}

[/code]


The path's are still full URL's.
rgds Heinz
...and btw. a code format tag would be fine wink

Notes: Every question must be a separate forum post. Headline: Formulate your question shortly and precisely. Thank you!
Powered by Question2Answer
...