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
I configured the serviceURL with zk+longhierarchical which means using LongHierarchicalLedgerManager.
But after executing shell metaformat, in the LAYOUT znode is HierarchicalLedgerManager in fact.
To Reproduce
Here is a UT to reproduce:
@Test
public void testFormat() throws Exception {
File tmpDir = tmpDirs.createNew("bookie", "test");
final String zkRoot = "/ledgers3";
final ServerConfiguration conf = TestBKConfiguration.newServerConfiguration()
.setJournalDirName(tmpDir.getPath())
.setLedgerDirNames(new String[] { tmpDir.getPath() })
.setMetadataServiceUri(zkUtil.getMetadataServiceUri(zkRoot, "longhierarchical"))
.setZkTimeout(5000);
BookKeeperAdmin.format(conf, false, false);
BookKeeperAdmin.format(conf, false, true); // need to set force true
}
The second time will fail with exception:
Caused by: java.io.IOException: Configured layout org.apache.bookkeeper.meta.LongHierarchicalLedgerManagerFactory does not match existing layout org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory
at org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory.newLedgerManagerFactory(AbstractZkLedgerManagerFactory.java:220)
at org.apache.bookkeeper.meta.zk.ZKMetadataDriverBase.getLedgerManagerFactory(ZKMetadataDriverBase.java:263)
... 21 more
Expected behavior
LedgerManagerFactory Info storing in the LAYOUT node should be exactly the same as configuration
And no matter how many time format execution, all should be successful with same configuration
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Reidddddd
changed the title
[Bug] Info storing in LAYOUT znode is not correct
[Bug] LedgerManagerFactory Info storing in LAYOUT znode is not correct
Oct 3, 2023
BUG REPORT
Describe the bug
I configured the serviceURL with zk+longhierarchical which means using LongHierarchicalLedgerManager.
But after executing shell metaformat, in the LAYOUT znode is HierarchicalLedgerManager in fact.
To Reproduce
Here is a UT to reproduce:
The second time will fail with exception:
Expected behavior
LedgerManagerFactory Info storing in the LAYOUT node should be exactly the same as configuration
And no matter how many time
format
execution, all should be successful with same configurationScreenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: