This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch 2.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push: new fcaf4d35a6 Logs extent and files on failure to update tablets files (#3671) fcaf4d35a6 is described below commit fcaf4d35a67089b60b87f19f7f1a32e1d74a75df Author: Keith Turner <ktur...@apache.org> AuthorDate: Tue Aug 22 13:39:24 2023 -0400 Logs extent and files on failure to update tablets files (#3671) --- .../accumulo/tserver/tablet/DatafileManager.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java index 75fd9f79f8..f54ca73339 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java @@ -282,6 +282,12 @@ class DatafileManager { for (Entry<StoredTabletFile,DataFileValue> entry : newFiles.entrySet()) { TabletLogger.bulkImported(tablet.getExtent(), entry.getKey()); } + } catch (Exception e) { + // Any exception in this code is prone to leaving the persisted tablet metadata and the + // tablets in memory data structs out of sync. Log the extent and exact files involved as this + // may be useful for debugging. + log.error("Failure adding bulk import files {} {}", tablet.getExtent(), paths.keySet(), e); + throw e; } finally { // increment finish count after metadata update AND updating in memory map of files metadataUpdateCount.updateAndGet(MetadataUpdateCount::incrementFinish); @@ -416,6 +422,12 @@ class DatafileManager { t2 = System.currentTimeMillis(); } + } catch (Exception e) { + // Any exception in this code is prone to leaving the persisted tablet metadata and the + // tablets in memory data structs out of sync. Log the extent and exact file involved as this + // may be useful for debugging. + log.error("Failure adding minor compacted file {} {}", tablet.getExtent(), newDatafile, e); + throw e; } finally { // increment finish count after metadata update AND updating in memory map of files metadataUpdateCount.updateAndGet(MetadataUpdateCount::incrementFinish); @@ -518,6 +530,13 @@ class DatafileManager { tablet.setLastCompactionID(compactionIdToWrite); removeFilesAfterScan(filesInUseByScans); + } catch (Exception e) { + // Any exception in this code is prone to leaving the persisted tablet metadata and the + // tablets in memory data structs out of sync. Log the extent and exact files involved as this + // may be useful for debugging. + log.error("Failure updating files after major compaction {} {} {}", tablet.getExtent(), + newFile, oldDatafiles, e); + throw e; } finally { // increment finish count after metadata update AND updating in memory map of files metadataUpdateCount.updateAndGet(MetadataUpdateCount::incrementFinish);