From 3800973a69c23deb5c770e8032074244f50f5b9a Mon Sep 17 00:00:00 2001
From: Valery Kharseko <vharseko@3a-systems.ru>
Date: Thu, 20 Aug 2026 09:02:47 +0000
Subject: [PATCH] Stamp JDBC backend tables with their tree name and refresh optimizer statistics after import (#866)

---
 opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java
index 1012c44..3309fac 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/spi/Importer.java
@@ -12,6 +12,7 @@
  * information: "Portions Copyright [year] [name of copyright owner]".
  *
  * Copyright 2014-2016 ForgeRock AS.
+ * Portions Copyright 2026 3A Systems, LLC.
  */
 package org.opends.server.backends.pluggable.spi;
 
@@ -74,6 +75,17 @@
    */
   SequentialCursor<ByteString, ByteString> openCursor(TreeName treeName);
 
+  /**
+   * Notifies this importer that the import failed or was cancelled, before {@link #close()} runs: what the trees hold
+   * is an incomplete import that is going to be run again. Implementations doing work of their own in {@link #close()}
+   * on the assumption that the data is final - refreshing the optimizer statistics of a database, for instance - can
+   * skip it. The default implementation does nothing.
+   */
+  default void aborted()
+  {
+    // nothing by default: an importer that treats a partial import like a complete one is not wrong, only wasteful
+  }
+
   @Override
   void close();
 }

--
Gitblit v1.10.0