| | |
| | | RebuildConfig rebuildConfig = new RebuildConfig(); |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.addRebuildIndex(index); |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | backend.rebuildBackend(rebuildConfig); |
| | | rebuildBackend(backendID, rebuildConfig); |
| | | |
| | | if(index.contains(".") && !index.startsWith("vlv.")) |
| | | { |
| | |
| | | RebuildConfig rebuildConfig = new RebuildConfig(); |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.addRebuildIndex("id2entry"); |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | backend.rebuildBackend(rebuildConfig); |
| | | rebuildBackend(backendID, rebuildConfig); |
| | | |
| | | } |
| | | |
| | |
| | | RebuildConfig rebuildConfig = new RebuildConfig(); |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.addRebuildIndex("id2entry"); |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | TaskUtils.disableBackend(backendID); |
| | | |
| | | try { |
| | | backend.rebuildBackend(rebuildConfig); |
| | | rebuildBackend(backendID, rebuildConfig); |
| | | } finally { |
| | | TaskUtils.enableBackend(backendID); |
| | | } |
| | |
| | | RebuildConfig rebuildConfig = new RebuildConfig(); |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.addRebuildIndex(index); |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | backend.rebuildBackend(rebuildConfig); |
| | | rebuildBackend(backendID, rebuildConfig); |
| | | } |
| | | |
| | | @Test(dataProvider = "systemIndexes", |
| | |
| | | RebuildConfig rebuildConfig = new RebuildConfig(); |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.addRebuildIndex(index); |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | backend.rebuildBackend(rebuildConfig); |
| | | rebuildBackend(backendID, rebuildConfig); |
| | | } |
| | | |
| | | @Test(dataProvider = "systemIndexes") |
| | |
| | | rebuildConfig.setBaseDN(baseDNs[0]); |
| | | rebuildConfig.addRebuildIndex(index); |
| | | |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | TaskUtils.disableBackend(backendID); |
| | | backend.rebuildBackend(rebuildConfig); |
| | | rebuildBackend(backendID, rebuildConfig); |
| | | |
| | | //TODO: Verify dn2uri database as well. |
| | | if (!"dn2uri".equalsIgnoreCase(index)) |
| | |
| | | |
| | | private void rebuildIndexes(RebuildConfig rebuildConfig) throws Exception |
| | | { |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | TaskUtils.disableBackend(backendID); |
| | | try |
| | | { |
| | | backend.rebuildBackend(rebuildConfig); |
| | | rebuildBackend(backendID, rebuildConfig); |
| | | assertEquals(verifyBackend(null), 0); |
| | | } |
| | | finally |
| | |
| | | } |
| | | } |
| | | |
| | | private void rebuildBackend(String backendID, RebuildConfig rebuildConfig) throws Exception |
| | | { |
| | | backend = DirectoryServer.getBackend(backendID); |
| | | backend.rebuildBackend(rebuildConfig, DirectoryServer.getInstance().getServerContext()); |
| | | } |
| | | |
| | | @Test |
| | | public void testRebuildRedundentIndexes() throws Exception |
| | | { |