Skip to content

Commit

Permalink
GH-489 Delete delete bitmap while reloading dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
ate47 committed Oct 10, 2024
1 parent 167d749 commit 4450c09
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.the_qa_company.qendpoint.compiler.CompiledSailOptions;
import com.the_qa_company.qendpoint.compiler.SailCompilerSchema;
import com.the_qa_company.qendpoint.compiler.SparqlRepository;
import com.the_qa_company.qendpoint.core.enums.TripleComponentOrder;
import com.the_qa_company.qendpoint.store.EndpointFiles;
import com.the_qa_company.qendpoint.store.EndpointStore;
import com.the_qa_company.qendpoint.store.EndpointStoreUtils;
Expand Down Expand Up @@ -499,6 +500,14 @@ public LoadFileResult loadFile(InputStream input, String filename) throws IOExce
}

Files.move(endHDT, endIndex);

// delete the old bitmap
Files.deleteIfExists(Path.of(files.getHDTBitX()));
Files.deleteIfExists(Path.of(files.getHDTBitY()));
Files.deleteIfExists(Path.of(files.getHDTBitZ()));
for (TripleComponentOrder order : TripleComponentOrder.values()) {
Files.deleteIfExists(Path.of(files.getTripleDeleteArr(order)));
}
} finally {
if (Files.exists(endIndex)) {
// everything worked
Expand Down

0 comments on commit 4450c09

Please sign in to comment.