This is an automated email from the ASF dual-hosted git repository. mhubail pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/asterixdb.git
commit 3942f5e958aa4635f24d6cd2253a18b4683a7322 Author: Ritik Raj <[email protected]> AuthorDate: Tue Mar 25 00:26:17 2025 +0530 [NO ISSUE][STO] Fix race while destroy - user model changes: no - storage format changes: no - interface changes: no Details: There are cases when trying to destroy unregistered index, where threads race to create and remove the dataset from datasets cache, which may cause the NPE while accessing datset from cache. Ext-ref: MB-65896 Change-Id: I932fd456493da47255d122833d6c6e1fe41fb02a Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19547 Integration-Tests: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Murtadha Hubail <[email protected]> --- .../java/org/apache/asterix/common/context/DatasetLifecycleManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java index c6edb4e3c8..fc27bf6936 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/context/DatasetLifecycleManager.java @@ -639,7 +639,7 @@ public class DatasetLifecycleManager implements IDatasetLifecycleManager, ILifeC @Override public ILSMComponentIdGenerator getComponentIdGenerator(int datasetId, int partition, String path) { - DatasetResource dataset = datasets.get(datasetId); + DatasetResource dataset = getDatasetLifecycle(datasetId); ILSMComponentIdGenerator generator = dataset.getComponentIdGenerator(partition); if (generator != null) { return generator;
