MCPcopy Create free account
hub / github.com/apache/solr / deleteFile

Method deleteFile

solr/core/src/java/org/apache/solr/update/UpdateLog.java:2513–2529  ·  view source on GitHub ↗
(Path file)

Source from the content-addressed store, hash-verified

2511 ThreadPoolExecutor recoveryExecutor =
2512 new ExecutorUtil.MDCAwareThreadPoolExecutor(
2513 0,
2514 Integer.MAX_VALUE,
2515 1,
2516 TimeUnit.SECONDS,
2517 new SynchronousQueue<Runnable>(),
2518 new SolrNamedThreadFactory("recoveryExecutor"));
2519
2520 public static void deleteFile(Path file) {
2521 boolean success = false;
2522 try {
2523 Files.deleteIfExists(file);
2524 success = true;
2525 } catch (Exception e) {
2526 log.error("Error deleting file: {}", file, e);
2527 }
2528
2529 if (!success) {
2530 try {
2531 PathUtils.deleteOnExit(file);
2532 } catch (Exception e) {

Callers 1

initTlogDirMethod · 0.95

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected