You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2026/10/08 22:05:03 UTC

(asterixdb) branch master updated (e1be1de71f -> 4ab052e718)

This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


    from e1be1de71f [ASTERIXDB-3183][CONF] Rename QUERY_PLAN_CACHE_CAPACITY
     new 9ebad090a4 [ASTERIXDB-3851][NET][BP] Identify the peer on inter-node TLS
     new 2a1f22076d Merge branch 'gerrit/trinity' into 'gerrit/morpheus'
     new 9557d5de2a Null merge branch 'gerrit/morpheus' into 'gerrit/helios'
     new 9ced76642b [ASTERIXDB-3947][STO] Rename the max open descriptors option
     new 97c82bf7be [ASTERIXDB-3947][CONF] Support aliases for option names
     new ed0ede2540 [ASTERIXDB-3944][STO] Fix column range filters
     new d88df93091 [ASTERIXDB-3947][STO] Separate the words of storage option names
     new 37de944782 [ASTERIXDB-3947][CONF] Revert option aliases and the storage renames
     new ee47025379 [NO ISSUE][RT] Locate duplicate field errors and test the field named
     new 49c1b80b06 [NO ISSUE][COMP] Log pushdown variable lookups at trace level
     new aff51e5c06 [NO ISSUE][COMP] Fix CME in index-only ANN plan with cross-pollination
     new 7f16ff6907 [ASTERIXDB-3949][STO] Merge secondary indexes of atomic datasets
     new 4ab052e718 Merge branch 'gerrit/helios' into 'master'

The 13 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../rules/am/VectorIndexAccessMethod.java          |   4 +-
 .../optimizer/rules/pushdown/PushdownContext.java  |   4 +-
 .../asterix/app/message/EnableMergeMessage.java    |   4 +-
 .../constant-left/constant-left.001.ddl.sqlpp}     |  37 +--
 .../constant-left/constant-left.002.update.sqlpp}  |  38 +--
 .../constant-left/constant-left.003.get.http}      |  33 +--
 .../constant-left/constant-left.004.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.005.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.006.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.007.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.008.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.009.query.sqlpp}   |  34 +--
 .../filter/double-nan/double-nan.001.ddl.sqlpp}    |  37 +--
 .../filter/double-nan/double-nan.002.update.sqlpp} |  40 +--
 .../filter/double-nan/double-nan.003.get.http}     |  33 +--
 .../filter/double-nan/double-nan.004.query.sqlpp}  |  34 +--
 .../filter/double-nan/double-nan.005.query.sqlpp}  |  34 +--
 .../queries_sqlpp/objects/ObjectsQueries.xml       |   8 +
 .../object_merge_duplicate_fields.01.query.sqlpp}  |  33 +--
 .../object_merge_duplicate_fields.02.query.sqlpp}  |  33 +--
 .../object_merge_duplicate_fields.03.query.sqlpp}  |  33 +--
 .../object_merge_duplicate_fields.04.query.sqlpp}  |  33 +--
 .../atomic-secondary-merge.1.ddl.sqlpp}            |  34 +--
 .../atomic-secondary-merge.2.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.3.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.4.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.5.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.6.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.7.pollquery.sqlpp}      |  37 +--
 .../atomic-secondary-merge.8.ddl.sqlpp}            |   0
 .../queries_sqlpp/vector/VectorQueries.xml         |   5 +
 .../vtree-cross-pollination-include.1.ddl.sqlpp}   |  44 +---
 .../vtree-cross-pollination-include.2.update.sqlpp |  33 +++
 .../vtree-cross-pollination-include.3.ddl.sqlpp}   |  32 +--
 .../vtree-cross-pollination-include.4.ddl.sqlpp}   |  37 +--
 .../vtree-cross-pollination-include.5.query.sqlpp} |  37 +--
 .../vtree-cross-pollination-include.6.query.sqlpp} |  37 +--
 .../vtree-cross-pollination-include.7.plans.sqlpp} |  38 +--
 .../vtree-cross-pollination-include.99.ddl.sqlpp}  |   0
 .../constant-left/constant-left.003.regexadm}      |   0
 .../filter/constant-left/constant-left.004.adm     |   1 +
 .../filter/constant-left/constant-left.005.adm     |   1 +
 .../filter/constant-left/constant-left.006.adm}    |   0
 .../filter/constant-left/constant-left.007.adm}    |   0
 .../filter/constant-left/constant-left.008.adm     |   1 +
 .../filter/constant-left/constant-left.009.adm     |   1 +
 .../double-nan/double-nan.003.regexadm}            |   0
 .../column/filter/double-nan/double-nan.004.adm    |   3 +
 .../column/filter/double-nan/double-nan.005.adm    |   5 +
 .../object_merge_duplicate_fields.04.adm           |   1 +
 .../atomic-secondary-merge.7.adm}                  |   0
 .../vtree-cross-pollination-include.5.adm}         |   0
 .../vtree-cross-pollination-include.6.adm          |   3 +
 .../vtree-cross-pollination-include.7.plan         |  34 +++
 .../vtree-cross-pollination-include.7.plan         |  34 +++
 .../vtree-cross-pollination-include.7.plan         |  34 +++
 .../src/test/resources/runtimets/sqlpp_queries.xml |  10 +
 .../runtimets/testsuite_single_partition_sqlpp.xml |  10 +
 .../test/resources/runtimets/testsuite_storage.xml |   5 +
 .../accessor/ColumnRangeFilterValueAccessor.java   |   7 +
 .../AbstractColumnFilterComparatorFactory.java     |  10 +
 .../compartor/GEColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/GTColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/LEColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/LTColumnFilterEvaluatorFactory.java  |   3 +-
 .../writer/filters/DoubleColumnFilterWriter.java   |  16 +-
 .../column/test/filter/NumericFilterTest.java      | 281 +++++++++++++++++++++
 .../asterix/common/config/StorageProperties.java   |   6 +-
 .../asterix-doc/src/site/markdown/ncservice.md     |   2 +-
 .../utils/filter/ColumnRangeFilterBuilder.java     |  13 +-
 .../records/RecordAddFieldsDescriptor.java         |   2 +-
 .../functions/records/RecordMergeEvaluator.java    |   2 +-
 .../transaction/AtomicNoWALTransactionContext.java |  10 +-
 73 files changed, 666 insertions(+), 979 deletions(-)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.001.ddl.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.002.update.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.003.get.http} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.004.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.005.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.006.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.007.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.008.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.009.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.001.ddl.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.002.update.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.003.get.http} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.004.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.005.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.01.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.02.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.03.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.1.ddl.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.2.update.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.3.update.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.4.update.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.5.update.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.6.update.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.7.pollquery.sqlpp} (53%)
 copy asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/{metrics/plan-cache-ddl-replace/plan-cache-ddl-replace.013.ddl.sqlpp => storage/atomic-secondary-merge/atomic-secondary-merge.8.ddl.sqlpp} (100%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.1.ddl.sqlpp} (53%)
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.2.update.sqlpp
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.3.ddl.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.4.ddl.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.query.sqlpp} (53%)
 copy asterixdb/{asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java => asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plans.sqlpp} (53%)
 copy asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/{cloud_storage/dic-merge-misalign/mis.999.ddl.sqlpp => vector/vtree-cross-pollination-include/vtree-cross-pollination-include.99.ddl.sqlpp} (100%)
 copy asterixdb/asterix-app/src/test/resources/runtimets/results/column/{analyze-dataset/analyze-dataset.003.regexadm => filter/constant-left/constant-left.003.regexadm} (100%)
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.004.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.005.adm
 copy asterixdb/asterix-app/src/test/resources/runtimets/results/{copy-from/copy-1/copy-1.1.adm => column/filter/constant-left/constant-left.006.adm} (100%)
 copy asterixdb/asterix-app/src/test/resources/{metadata/results/basic/dataset_with_default_dataverse_type/dataset_with_default_dataverse_type.2.adm => runtimets/results/column/filter/constant-left/constant-left.007.adm} (100%)
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.008.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.009.adm
 copy asterixdb/asterix-app/src/test/resources/runtimets/results/column/{analyze-dataset/analyze-dataset.003.regexadm => filter/double-nan/double-nan.003.regexadm} (100%)
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.004.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.005.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.adm
 copy asterixdb/asterix-app/src/test/resources/runtimets/results/{cluster-by/kmeans-seed/kmeans-seed.9.adm => storage/atomic-secondary-merge/atomic-secondary-merge.7.adm} (100%)
 copy asterixdb/asterix-app/src/test/resources/runtimets/results/{column/filter/boolean/boolean.020.adm => vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.adm} (100%)
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.adm
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results_full_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
 create mode 100644 asterixdb/asterix-app/src/test/resources/runtimets/results_less_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
 create mode 100644 asterixdb/asterix-column/src/test/java/org/apache/asterix/column/test/filter/NumericFilterTest.java


(asterixdb) 04/13: [ASTERIXDB-3947][STO] Rename the max open descriptors option

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 9ced76642b1caa5beaa62d27aae29bae8ef3a913
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Wed Oct 7 18:20:53 2026 -0400

    [ASTERIXDB-3947][STO] Rename the max open descriptors option
    
    - user model changes: yes
    - storage format changes: no
    - interface changes: no
    
    Details: Rename STORAGE_BUFFERCACHE_MAXOPENDESCRIPTORS to
    STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS, so its key reads
    storage.buffer.cache.max.open.descriptors rather than running the words
    together. The option has not been released, so the old name is not kept.
    
    Ext-ref: MB-74476
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: I5cec40b598c555887d745486971d1f7eba8f3708
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22016
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Michael Blow <mb...@apache.org>
    Reviewed-by: Hussain Altowileb <hu...@gmail.com>
---
 .../java/org/apache/asterix/common/config/StorageProperties.java    | 6 +++---
 asterixdb/asterix-doc/src/site/markdown/ncservice.md                | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
index 31a390f506..7f193d7085 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
@@ -56,7 +56,7 @@ public class StorageProperties extends AbstractProperties {
         // By default, uses 1/4 of the maximum heap size for read cache, i.e., disk buffer cache.
         STORAGE_BUFFERCACHE_SIZE(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
         STORAGE_BUFFERCACHE_MAXOPENFILES(NONNEGATIVE_INTEGER, Integer.MAX_VALUE),
-        STORAGE_BUFFERCACHE_MAXOPENDESCRIPTORS(NONNEGATIVE_INTEGER, 0),
+        STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS(NONNEGATIVE_INTEGER, 0),
         STORAGE_MEMORYCOMPONENT_GLOBALBUDGET(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
         STORAGE_MEMORYCOMPONENT_PAGESIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
         STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS(POSITIVE_INTEGER, 2),
@@ -139,7 +139,7 @@ public class StorageProperties extends AbstractProperties {
                             + " of the buffer cache page size.";
                 case STORAGE_BUFFERCACHE_MAXOPENFILES:
                     return "The maximum number of open files in the buffer cache";
-                case STORAGE_BUFFERCACHE_MAXOPENDESCRIPTORS:
+                case STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS:
                     return "The number of OS file descriptors the buffer cache aims to hold at most. Beyond it, the"
                             + " descriptors of the least recently used files with no I/O in progress and no unforced"
                             + " writes are closed, and reopened on their next I/O. 0 means half of the process's"
@@ -276,7 +276,7 @@ public class StorageProperties extends AbstractProperties {
      *         limit cannot be determined
      */
     public int getBufferCacheMaxOpenDescriptors() {
-        int configured = accessor.getInt(Option.STORAGE_BUFFERCACHE_MAXOPENDESCRIPTORS);
+        int configured = accessor.getInt(Option.STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS);
         if (configured > 0) {
             return configured;
         }
diff --git a/asterixdb/asterix-doc/src/site/markdown/ncservice.md b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
index 2f16b18362..4ce41ec39b 100644
--- a/asterixdb/asterix-doc/src/site/markdown/ncservice.md
+++ b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
@@ -324,7 +324,7 @@ The following parameters for slave processes, under "[nc]" sections.
 |   nc    | result.public.port                        | Public IP port to announce dataset result distribution listener | same as result.listen.port |
 |   nc    | result.sweep.threshold                    | The duration within which an instance of the result cleanup should be invoked in milliseconds | 60000 |
 |   nc    | result.ttl                                | Limits the amount of time results for asynchronous jobs should be retained by the system in milliseconds | 86400000 |
-|   nc    | storage.buffercache.maxopendescriptors    | The number of OS file descriptors the buffer cache aims to hold at most. Beyond it, the descriptors of the least recently used files with no I/O in progress and no unforced writes are closed, and reopened on their next I/O. 0 means half of the process's maximum number of open files, or unbounded where that limit cannot be determined. Not applied on cloud storage | 0 |
+|   nc    | storage.buffer.cache.max.open.descriptors | The number of OS file descriptors the buffer cache aims to hold at most. Beyond it, the descriptors of the least recently used files with no I/O in progress and no unforced writes are closed, and reopened on their next I/O. 0 means half of the process's maximum number of open files, or unbounded where that limit cannot be determined. Not applied on cloud storage | 0 |
 |   nc    | storage.buffercache.maxopenfiles          | The maximum number of open files in the buffer cache | 2147483647 |
 |   nc    | storage.buffercache.pagesize              | The page size in bytes for pages in the buffer cache | 131072 (128 kB) |
 |   nc    | storage.buffercache.size                  | The size of memory allocated to the disk buffer cache.  The value should be a multiple of the buffer cache page size. | 1/4 of the JVM allocated memory |


(asterixdb) 06/13: [ASTERIXDB-3944][STO] Fix column range filters

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit ed0ede2540f45653c23127925f62e809b0d59b05
Author: Manish Thakur <ma...@gmail.com>
AuthorDate: Thu Oct 8 13:06:19 2026 +0530

    [ASTERIXDB-3944][STO] Fix column range filters
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Details: A range filter skips a mega leaf node when its stored min/max
    show it cannot match, so a range narrower than the data drops rows.
    
    - Double min/max started at Double.MIN_VALUE, the smallest positive
      double, and Double.MAX_VALUE, so the stored range was rarely narrow
      enough to skip anything.
    - A NaN made Math.min/max store NaN for both bounds, and the
      comparators, which used Java's < and >, then skipped that leaf for
      every predicate, as they did every leaf for a NaN constant. Order
      doubles as SQL++ does, with NaN above +INF and -0.0 equal to 0.0.
    - With the constant on the left (c <= x), invert() negated the
      operator instead of mirroring it, skipping a leaf whose max equals
      the constant, for all types. The wide double bounds had hidden it.
    - Leaves written before this change with a NaN keep a NaN min, which
      the writer no longer produces; treat it as unknown and read them.
    
    Ext-ref: MB-74478,MB-74479
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: I54d725ebb7a8dcae57d4aac6de3594f8188609c8
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22027
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Ritik Raj <ri...@couchbase.com>
    Reviewed-by: Manish Thakur <ma...@gmail.com>
---
 .../constant-left/constant-left.001.ddl.sqlpp}     |  37 +--
 .../constant-left/constant-left.002.update.sqlpp}  |  38 +--
 .../constant-left/constant-left.003.get.http}      |  33 +--
 .../constant-left/constant-left.004.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.005.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.006.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.007.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.008.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.009.query.sqlpp}   |  34 +--
 .../filter/double-nan/double-nan.001.ddl.sqlpp}    |  37 +--
 .../filter/double-nan/double-nan.002.update.sqlpp} |  40 +--
 .../filter/double-nan/double-nan.003.get.http}     |  33 +--
 .../filter/double-nan/double-nan.004.query.sqlpp}  |  34 +--
 .../filter/double-nan/double-nan.005.query.sqlpp}  |  34 +--
 .../constant-left/constant-left.003.regexadm       |   1 +
 .../filter/constant-left/constant-left.004.adm     |   1 +
 .../filter/constant-left/constant-left.005.adm     |   1 +
 .../filter/constant-left/constant-left.006.adm     |   1 +
 .../filter/constant-left/constant-left.007.adm     |   1 +
 .../filter/constant-left/constant-left.008.adm     |   1 +
 .../filter/constant-left/constant-left.009.adm     |   1 +
 .../filter/double-nan/double-nan.003.regexadm      |   1 +
 .../column/filter/double-nan/double-nan.004.adm    |   3 +
 .../column/filter/double-nan/double-nan.005.adm    |   5 +
 .../src/test/resources/runtimets/sqlpp_queries.xml |  10 +
 .../runtimets/testsuite_single_partition_sqlpp.xml |  10 +
 .../accessor/ColumnRangeFilterValueAccessor.java   |   7 +
 .../AbstractColumnFilterComparatorFactory.java     |  10 +
 .../compartor/GEColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/GTColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/LEColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/LTColumnFilterEvaluatorFactory.java  |   3 +-
 .../writer/filters/DoubleColumnFilterWriter.java   |  16 +-
 .../column/test/filter/NumericFilterTest.java      | 281 +++++++++++++++++++++
 .../utils/filter/ColumnRangeFilterBuilder.java     |  13 +-
 35 files changed, 427 insertions(+), 438 deletions(-)

diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.001.ddl.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.001.ddl.sqlpp
index 6fccabe37e..3e9873a069 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.001.ddl.sqlpp
@@ -16,35 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
+USE test;
 
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
+CREATE TYPE t1 AS OPEN {
+  id : bigint
+};
 
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+CREATE DATASET ds(t1) PRIMARY KEY id WITH {
+    "storage-format": {"format" : "column"}
+};
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.002.update.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.002.update.sqlpp
index 6fccabe37e..7ca33efa8d 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.002.update.sqlpp
@@ -16,35 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+-- Each query's constant is the column's max or min, so a mega leaf holding it is skipped unless the filter is
+-- inclusive at that bound
+INSERT INTO ds ([
+  {"id": 0, "d": double(1.0), "i": 1, "s": "apple"},
+  {"id": 1, "d": double(5.0), "i": 5, "s": "mango"},
+  {"id": 2, "d": double(7.0), "i": 7, "s": "zebra"}
+]);
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.003.get.http
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.003.get.http
index 6fccabe37e..de9d951afc 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.003.get.http
@@ -16,35 +16,4 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
-
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
-
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+/connector?dataverseName=test&datasetName=ds
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.004.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.004.query.sqlpp
index 6fccabe37e..982c42cde7 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.004.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE d
+FROM ds
+WHERE double(7) <= d ORDER BY d;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.005.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.005.query.sqlpp
index 6fccabe37e..46971f9ec7 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.005.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE d
+FROM ds
+WHERE double(1) >= d ORDER BY d;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.006.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.006.query.sqlpp
index 6fccabe37e..f879034598 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.006.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE i
+FROM ds
+WHERE 7 <= i ORDER BY i;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.007.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.007.query.sqlpp
index 6fccabe37e..4a1c0f3180 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.007.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE i
+FROM ds
+WHERE 1 >= i ORDER BY i;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.008.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.008.query.sqlpp
index 6fccabe37e..07bc0bccb1 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.008.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE s
+FROM ds
+WHERE "zebra" <= s ORDER BY s;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.009.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.009.query.sqlpp
index 6fccabe37e..8b04db827c 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/constant-left/constant-left.009.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE s
+FROM ds
+WHERE "apple" >= s ORDER BY s;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.001.ddl.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.001.ddl.sqlpp
index 6fccabe37e..3e9873a069 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.001.ddl.sqlpp
@@ -16,35 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
+USE test;
 
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
+CREATE TYPE t1 AS OPEN {
+  id : bigint
+};
 
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+CREATE DATASET ds(t1) PRIMARY KEY id WITH {
+    "storage-format": {"format" : "column"}
+};
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.002.update.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.002.update.sqlpp
index 6fccabe37e..0fa4343dcc 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.002.update.sqlpp
@@ -16,35 +16,15 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+-- Only disk components are range filtered, so 003 flushes these before they are queried
+INSERT INTO ds ([
+  {"id": 0, "c_double": double(-3.0)},
+  {"id": 1, "c_double": double(1.0)},
+  {"id": 2, "c_double": double("NaN")},
+  {"id": 3, "c_double": double(7.0)},
+  {"id": 4, "c_double": double("INF")},
+  {"id": 5, "c_double": double(2.5)}
+]);
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.003.get.http
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.003.get.http
index 6fccabe37e..de9d951afc 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.003.get.http
@@ -16,35 +16,4 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
-
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
-
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+/connector?dataverseName=test&datasetName=ds
\ No newline at end of file
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.004.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.004.query.sqlpp
index 6fccabe37e..e4de7b26fd 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.004.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE c_double
+FROM ds
+WHERE c_double > double(5) ORDER BY c_double;
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.005.query.sqlpp
similarity index 53%
copy from asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
copy to asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.005.query.sqlpp
index 6fccabe37e..1e1d131602 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/column/filter/double-nan/double-nan.005.query.sqlpp
@@ -16,35 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.asterix.column.values.writer.filters;
 
-public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
-    private double min;
-    private double max;
+USE test;
 
-    public DoubleColumnFilterWriter() {
-        reset();
-    }
-
-    @Override
-    public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
-    }
-
-    @Override
-    public long getMinNormalizedValue() {
-        return Double.doubleToLongBits(min);
-    }
-
-    @Override
-    public long getMaxNormalizedValue() {
-        return Double.doubleToLongBits(max);
-    }
-
-    @Override
-    public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
-    }
-}
+SELECT VALUE c_double
+FROM ds
+WHERE c_double < double("NaN") ORDER BY c_double;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.003.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.003.regexadm
new file mode 100644
index 0000000000..52c00817a6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.003.regexadm
@@ -0,0 +1 @@
+\Q{"keys":"id","type":{"type":"org.apache.asterix.om.types.ARecordType","name":"t1","open":true,"fields":[{"id":{"type":"AInt64"}}]},"splits":[\E.*\Q]}\E
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.004.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.004.adm
new file mode 100644
index 0000000000..7104585f9a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.004.adm
@@ -0,0 +1 @@
+7.0
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.005.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.005.adm
new file mode 100644
index 0000000000..9f8e9b69a3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.005.adm
@@ -0,0 +1 @@
+1.0
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.006.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.006.adm
new file mode 100644
index 0000000000..c7930257df
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.006.adm
@@ -0,0 +1 @@
+7
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.007.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.007.adm
new file mode 100644
index 0000000000..56a6051ca2
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.007.adm
@@ -0,0 +1 @@
+1
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.008.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.008.adm
new file mode 100644
index 0000000000..006ec5bd53
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.008.adm
@@ -0,0 +1 @@
+"zebra"
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.009.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.009.adm
new file mode 100644
index 0000000000..cd3339b8e7
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/constant-left/constant-left.009.adm
@@ -0,0 +1 @@
+"apple"
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.003.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.003.regexadm
new file mode 100644
index 0000000000..52c00817a6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.003.regexadm
@@ -0,0 +1 @@
+\Q{"keys":"id","type":{"type":"org.apache.asterix.om.types.ARecordType","name":"t1","open":true,"fields":[{"id":{"type":"AInt64"}}]},"splits":[\E.*\Q]}\E
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.004.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.004.adm
new file mode 100644
index 0000000000..6b49692207
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.004.adm
@@ -0,0 +1,3 @@
+7.0
+INF
+NaN
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.005.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.005.adm
new file mode 100644
index 0000000000..f3d33478ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/column/filter/double-nan/double-nan.005.adm
@@ -0,0 +1,5 @@
+-3.0
+1.0
+2.5
+7.0
+INF
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
index cd1fea5e0e..b45705da44 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/sqlpp_queries.xml
@@ -16973,6 +16973,16 @@
         <output-dir compare="Text">filter/double-precision</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="column">
+      <compilation-unit name="filter/double-nan">
+        <output-dir compare="Text">filter/double-nan</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="column">
+      <compilation-unit name="filter/constant-left">
+        <output-dir compare="Text">filter/constant-left</output-dir>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="column">
       <compilation-unit name="filter/return-array">
         <output-dir compare="Text">filter/return-array</output-dir>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
index 16a836c171..8889f7ef46 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_single_partition_sqlpp.xml
@@ -134,6 +134,16 @@
         <output-dir compare="Text">filter/double-precision</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="column">
+      <compilation-unit name="filter/double-nan">
+        <output-dir compare="Text">filter/double-nan</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="column">
+      <compilation-unit name="filter/constant-left">
+        <output-dir compare="Text">filter/constant-left</output-dir>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="column">
       <compilation-unit name="filter/return-array">
         <output-dir compare="Text">filter/return-array</output-dir>
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/accessor/ColumnRangeFilterValueAccessor.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/accessor/ColumnRangeFilterValueAccessor.java
index de68ab310b..f319fd2ed2 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/accessor/ColumnRangeFilterValueAccessor.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/accessor/ColumnRangeFilterValueAccessor.java
@@ -22,6 +22,8 @@ import org.apache.asterix.column.filter.range.IColumnRangeFilterValueAccessor;
 import org.apache.asterix.om.types.ATypeTag;
 
 public class ColumnRangeFilterValueAccessor implements IColumnRangeFilterValueAccessor {
+    private static final long NAN_BITS = Double.doubleToLongBits(Double.NaN);
+    private static final long NEGATIVE_INFINITY_BITS = Double.doubleToLongBits(Double.NEGATIVE_INFINITY);
     private final int columnIndex;
     private final ATypeTag typeTag;
     private final boolean min;
@@ -42,6 +44,11 @@ public class ColumnRangeFilterValueAccessor implements IColumnRangeFilterValueAc
     }
 
     public void setNormalizedValue(long normalizedValue) {
+        if (min && typeTag == ATypeTag.DOUBLE && normalizedValue == NAN_BITS) {
+            // Before ASTERIXDB-3944 a NaN made the writer store NaN for both bounds of a mega leaf node, hiding its
+            // real min. The writer no longer stores a NaN min, so one comes only from such older data: read it.
+            normalizedValue = NEGATIVE_INFINITY_BITS;
+        }
         this.normalizedValue = normalizedValue;
     }
 
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/AbstractColumnFilterComparatorFactory.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/AbstractColumnFilterComparatorFactory.java
index e0d927ef28..e0a234e8dc 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/AbstractColumnFilterComparatorFactory.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/AbstractColumnFilterComparatorFactory.java
@@ -26,6 +26,7 @@ import org.apache.asterix.column.filter.range.IColumnRangeFilterEvaluatorFactory
 import org.apache.asterix.column.filter.range.IColumnRangeFilterValueAccessor;
 import org.apache.asterix.column.filter.range.IColumnRangeFilterValueAccessorFactory;
 import org.apache.asterix.column.filter.range.accessor.NoOpColumnRangeFilterValueAccessor;
+import org.apache.asterix.dataflow.data.nontagged.comparators.ComparatorUtil;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.hierachy.ATypeHierarchy;
 import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -92,5 +93,14 @@ abstract class AbstractColumnFilterComparatorFactory implements IColumnRangeFilt
             this.left = left;
             this.right = right;
         }
+
+        /**
+         * Compares in the order SQL++ predicates compare doubles (NaN above +INF, -0.0 equal to 0.0), so a mega
+         * leaf node that the predicate could match is never skipped.
+         */
+        protected final int compareDoubles() {
+            return ComparatorUtil.compareDoubles(Double.longBitsToDouble(left.getNormalizedValue()),
+                    Double.longBitsToDouble(right.getNormalizedValue()));
+        }
     }
 }
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GEColumnFilterEvaluatorFactory.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GEColumnFilterEvaluatorFactory.java
index e61e7db8d8..672605fa98 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GEColumnFilterEvaluatorFactory.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GEColumnFilterEvaluatorFactory.java
@@ -38,8 +38,7 @@ public class GEColumnFilterEvaluatorFactory extends AbstractColumnFilterComparat
             @Override
             public boolean evaluate() {
                 if (left.getTypeTag() == ATypeTag.DOUBLE) {
-                    return Double.longBitsToDouble(left.getNormalizedValue()) >= Double
-                            .longBitsToDouble(right.getNormalizedValue());
+                    return compareDoubles() >= 0;
                 }
                 return left.getNormalizedValue() >= right.getNormalizedValue();
             }
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GTColumnFilterEvaluatorFactory.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GTColumnFilterEvaluatorFactory.java
index 2115d810f2..1919a71cc6 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GTColumnFilterEvaluatorFactory.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/GTColumnFilterEvaluatorFactory.java
@@ -38,8 +38,7 @@ public class GTColumnFilterEvaluatorFactory extends AbstractColumnFilterComparat
             @Override
             public boolean evaluate() {
                 if (left.getTypeTag() == ATypeTag.DOUBLE) {
-                    return Double.longBitsToDouble(left.getNormalizedValue()) > Double
-                            .longBitsToDouble(right.getNormalizedValue());
+                    return compareDoubles() > 0;
                 }
                 return left.getNormalizedValue() > right.getNormalizedValue();
             }
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LEColumnFilterEvaluatorFactory.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LEColumnFilterEvaluatorFactory.java
index 99e1a39dd8..4bf2cae4f6 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LEColumnFilterEvaluatorFactory.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LEColumnFilterEvaluatorFactory.java
@@ -38,8 +38,7 @@ public class LEColumnFilterEvaluatorFactory extends AbstractColumnFilterComparat
             @Override
             public boolean evaluate() {
                 if (left.getTypeTag() == ATypeTag.DOUBLE) {
-                    return Double.longBitsToDouble(left.getNormalizedValue()) <= Double
-                            .longBitsToDouble(right.getNormalizedValue());
+                    return compareDoubles() <= 0;
                 }
                 return left.getNormalizedValue() <= right.getNormalizedValue();
             }
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LTColumnFilterEvaluatorFactory.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LTColumnFilterEvaluatorFactory.java
index 429be80d1c..f6a568416b 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LTColumnFilterEvaluatorFactory.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/filter/range/compartor/LTColumnFilterEvaluatorFactory.java
@@ -38,8 +38,7 @@ public class LTColumnFilterEvaluatorFactory extends AbstractColumnFilterComparat
             @Override
             public boolean evaluate() {
                 if (left.getTypeTag() == ATypeTag.DOUBLE) {
-                    return Double.longBitsToDouble(left.getNormalizedValue()) < Double
-                            .longBitsToDouble(right.getNormalizedValue());
+                    return compareDoubles() < 0;
                 }
                 return left.getNormalizedValue() < right.getNormalizedValue();
             }
diff --git a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
index 6fccabe37e..d51fd8fb4f 100644
--- a/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
+++ b/asterixdb/asterix-column/src/main/java/org/apache/asterix/column/values/writer/filters/DoubleColumnFilterWriter.java
@@ -18,6 +18,8 @@
  */
 package org.apache.asterix.column.values.writer.filters;
 
+import org.apache.asterix.dataflow.data.nontagged.comparators.ComparatorUtil;
+
 public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
     private double min;
     private double max;
@@ -28,8 +30,14 @@ public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
 
     @Override
     public void addDouble(double value) {
-        min = Math.min(min, value);
-        max = Math.max(max, value);
+        // Math.min and Math.max return NaN once any value is NaN, and the range filter would then skip this mega
+        // leaf node for every predicate. In SQL++ order NaN is above +INF, so it is the max and leaves the min alone.
+        if (ComparatorUtil.compareDoubles(value, min) < 0) {
+            min = value;
+        }
+        if (ComparatorUtil.compareDoubles(value, max) > 0) {
+            max = value;
+        }
     }
 
     @Override
@@ -44,7 +52,7 @@ public class DoubleColumnFilterWriter extends AbstractColumnFilterWriter {
 
     @Override
     public void reset() {
-        min = Double.MIN_VALUE;
-        max = Double.MAX_VALUE;
+        min = Double.POSITIVE_INFINITY;
+        max = Double.NEGATIVE_INFINITY;
     }
 }
diff --git a/asterixdb/asterix-column/src/test/java/org/apache/asterix/column/test/filter/NumericFilterTest.java b/asterixdb/asterix-column/src/test/java/org/apache/asterix/column/test/filter/NumericFilterTest.java
new file mode 100644
index 0000000000..a01ad45cff
--- /dev/null
+++ b/asterixdb/asterix-column/src/test/java/org/apache/asterix/column/test/filter/NumericFilterTest.java
@@ -0,0 +1,281 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.column.test.filter;
+
+import org.apache.asterix.column.filter.range.IColumnRangeFilterEvaluatorFactory;
+import org.apache.asterix.column.filter.range.IColumnRangeFilterValueAccessorFactory;
+import org.apache.asterix.column.filter.range.accessor.ColumnRangeFilterValueAccessor;
+import org.apache.asterix.column.filter.range.accessor.ConstantColumnRangeFilterValueAccessorFactory;
+import org.apache.asterix.column.filter.range.compartor.GEColumnFilterEvaluatorFactory;
+import org.apache.asterix.column.filter.range.compartor.GTColumnFilterEvaluatorFactory;
+import org.apache.asterix.column.filter.range.compartor.LEColumnFilterEvaluatorFactory;
+import org.apache.asterix.column.filter.range.compartor.LTColumnFilterEvaluatorFactory;
+import org.apache.asterix.column.filter.range.evaluator.ANDColumnFilterEvaluatorFactory;
+import org.apache.asterix.column.values.writer.filters.AbstractColumnFilterWriter;
+import org.apache.asterix.column.values.writer.filters.DoubleColumnFilterWriter;
+import org.apache.asterix.column.values.writer.filters.LongColumnFilterWriter;
+import org.apache.asterix.om.base.ADouble;
+import org.apache.asterix.om.base.AInt64;
+import org.apache.asterix.om.base.IAObject;
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.hyracks.api.exceptions.HyracksDataException;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * A range filter that is too wide never produces a wrong answer, it only stops mega leaf nodes from being skipped,
+ * so query tests cannot detect it. These tests check the stored bounds and the skip decision directly, against the
+ * order SQL++ compares doubles in: NaN above +INF, and -0.0 equal to 0.0. The comparator for each predicate is the
+ * one {@code ColumnRangeFilterBuilder} creates for it with the constant on the right; the runtime test
+ * {@code column/filter/constant-left} covers the builder with the constant on the left.
+ */
+public class NumericFilterTest {
+
+    @Test
+    public void testDoubleMinMax() {
+        assertDoubleBounds(100.0, 200.0, 100.0, 150.0, 200.0);
+        assertDoubleBounds(-50.0, -10.0, -50.0, -30.0, -10.0);
+        assertDoubleBounds(-0.5, 0.5, 0.5, -0.5, 0.0);
+        assertDoubleBounds(7.25, 7.25, 7.25);
+    }
+
+    @Test
+    public void testDoubleMinMaxAfterReset() {
+        DoubleColumnFilterWriter writer = doubleLeaf(100.0, 200.0);
+        writer.reset();
+        writer.addDouble(-50.0);
+        writer.addDouble(-10.0);
+        assertDoubleBounds(writer, -50.0, -10.0);
+    }
+
+    @Test
+    public void testLongMinMax() {
+        assertLongBounds(100, 200, 100, 150, 200);
+        assertLongBounds(-50, -10, -50, -30, -10);
+        assertLongBounds(7, 7, 7);
+    }
+
+    @Test
+    public void testDoubleLeafSkipping() throws HyracksDataException {
+        DoubleColumnFilterWriter leaf = doubleLeaf(100.0, 150.0, 200.0);
+
+        Assert.assertFalse("x > 500", isRead(gt(new ADouble(500.0), leaf)));
+        Assert.assertFalse("x >= 500", isRead(ge(new ADouble(500.0), leaf)));
+        Assert.assertFalse("x < 50", isRead(lt(new ADouble(50.0), leaf)));
+        Assert.assertFalse("x <= 50", isRead(le(new ADouble(50.0), leaf)));
+        Assert.assertFalse("x = 300", isRead(eq(new ADouble(300.0), leaf)));
+        Assert.assertFalse("x = 50", isRead(eq(new ADouble(50.0), leaf)));
+
+        Assert.assertTrue("x > 150", isRead(gt(new ADouble(150.0), leaf)));
+        Assert.assertTrue("x >= 200", isRead(ge(new ADouble(200.0), leaf)));
+        Assert.assertTrue("x < 150", isRead(lt(new ADouble(150.0), leaf)));
+        Assert.assertTrue("x <= 100", isRead(le(new ADouble(100.0), leaf)));
+        Assert.assertTrue("x = 150", isRead(eq(new ADouble(150.0), leaf)));
+    }
+
+    @Test
+    public void testDoubleMinMaxWithNaN() {
+        assertDoubleBounds(5.0, Double.NaN, 5.0, Double.NaN, 7.0);
+        assertDoubleBounds(-0.5, Double.NaN, Double.NaN, -0.5);
+    }
+
+    @Test
+    public void testDoubleLeafWithNaNSkipping() throws HyracksDataException {
+        DoubleColumnFilterWriter leaf = doubleLeaf(5.0, Double.NaN, 7.0);
+
+        Assert.assertTrue("x > 100", isRead(gt(new ADouble(100.0), leaf)));
+        Assert.assertTrue("x > INF", isRead(gt(new ADouble(Double.POSITIVE_INFINITY), leaf)));
+        Assert.assertTrue("x >= NaN", isRead(ge(new ADouble(Double.NaN), leaf)));
+        Assert.assertTrue("x = NaN", isRead(eq(new ADouble(Double.NaN), leaf)));
+        Assert.assertTrue("x < 6", isRead(lt(new ADouble(6.0), leaf)));
+
+        Assert.assertFalse("x < 5", isRead(lt(new ADouble(5.0), leaf)));
+        Assert.assertFalse("x = 3", isRead(eq(new ADouble(3.0), leaf)));
+    }
+
+    @Test
+    public void testDoubleAllNaNLeafSkipping() throws HyracksDataException {
+        DoubleColumnFilterWriter leaf = doubleLeaf(Double.NaN, Double.NaN);
+
+        Assert.assertTrue("x > 5", isRead(gt(new ADouble(5.0), leaf)));
+        Assert.assertTrue("x = NaN", isRead(eq(new ADouble(Double.NaN), leaf)));
+
+        Assert.assertFalse("x < 5", isRead(lt(new ADouble(5.0), leaf)));
+        Assert.assertFalse("x = 5", isRead(eq(new ADouble(5.0), leaf)));
+    }
+
+    @Test
+    public void testDoubleLeafWrittenWithNaNBoundsIsRead() throws HyracksDataException {
+        long nan = Double.doubleToLongBits(Double.NaN);
+        AbstractColumnFilterWriter leaf = storedLeaf(nan, nan);
+
+        Assert.assertTrue("x < 1", isRead(lt(new ADouble(1.0), leaf)));
+        Assert.assertTrue("x <= 1", isRead(le(new ADouble(1.0), leaf)));
+        Assert.assertTrue("x = 3", isRead(eq(new ADouble(3.0), leaf)));
+        Assert.assertTrue("x > 1", isRead(gt(new ADouble(1.0), leaf)));
+    }
+
+    @Test
+    public void testDoubleMissingColumnIsSkipped() throws HyracksDataException {
+        AbstractColumnFilterWriter leaf = storedLeaf(Long.MAX_VALUE, Long.MIN_VALUE);
+
+        Assert.assertFalse("x < 1", isRead(lt(new ADouble(1.0), leaf)));
+        Assert.assertFalse("x = 3", isRead(eq(new ADouble(3.0), leaf)));
+        Assert.assertFalse("x > 1", isRead(gt(new ADouble(1.0), leaf)));
+    }
+
+    @Test
+    public void testDoubleNaNConstantSkipping() throws HyracksDataException {
+        DoubleColumnFilterWriter leaf = doubleLeaf(100.0, 150.0, 200.0);
+
+        Assert.assertTrue("x < NaN", isRead(lt(new ADouble(Double.NaN), leaf)));
+        Assert.assertTrue("x <= NaN", isRead(le(new ADouble(Double.NaN), leaf)));
+
+        Assert.assertFalse("x > NaN", isRead(gt(new ADouble(Double.NaN), leaf)));
+        Assert.assertFalse("x >= NaN", isRead(ge(new ADouble(Double.NaN), leaf)));
+        Assert.assertFalse("x = NaN", isRead(eq(new ADouble(Double.NaN), leaf)));
+    }
+
+    @Test
+    public void testDoubleSignedZeroSkipping() throws HyracksDataException {
+        DoubleColumnFilterWriter leaf = doubleLeaf(0.0);
+
+        Assert.assertTrue("x = -0.0", isRead(eq(new ADouble(-0.0), leaf)));
+        Assert.assertTrue("x <= -0.0", isRead(le(new ADouble(-0.0), leaf)));
+        Assert.assertTrue("x >= -0.0", isRead(ge(new ADouble(-0.0), leaf)));
+
+        Assert.assertFalse("x < -0.0", isRead(lt(new ADouble(-0.0), leaf)));
+        Assert.assertFalse("x > -0.0", isRead(gt(new ADouble(-0.0), leaf)));
+    }
+
+    @Test
+    public void testLongLeafSkipping() throws HyracksDataException {
+        LongColumnFilterWriter leaf = longLeaf(100, 150, 200);
+
+        Assert.assertFalse("x > 500", isRead(gt(new AInt64(500), leaf)));
+        Assert.assertFalse("x < 50", isRead(lt(new AInt64(50), leaf)));
+        Assert.assertFalse("x = 300", isRead(eq(new AInt64(300), leaf)));
+
+        Assert.assertTrue("x > 150", isRead(gt(new AInt64(150), leaf)));
+        Assert.assertTrue("x < 150", isRead(lt(new AInt64(150), leaf)));
+        Assert.assertTrue("x = 150", isRead(eq(new AInt64(150), leaf)));
+    }
+
+    private static DoubleColumnFilterWriter doubleLeaf(double... values) {
+        DoubleColumnFilterWriter writer = new DoubleColumnFilterWriter();
+        for (double value : values) {
+            writer.addDouble(value);
+        }
+        return writer;
+    }
+
+    private static LongColumnFilterWriter longLeaf(long... values) {
+        LongColumnFilterWriter writer = new LongColumnFilterWriter();
+        for (long value : values) {
+            writer.addLong(value);
+        }
+        return writer;
+    }
+
+    /**
+     * A mega leaf node as found on disk, with the given normalized bounds
+     */
+    private static AbstractColumnFilterWriter storedLeaf(long min, long max) {
+        return new AbstractColumnFilterWriter() {
+            @Override
+            public long getMinNormalizedValue() {
+                return min;
+            }
+
+            @Override
+            public long getMaxNormalizedValue() {
+                return max;
+            }
+
+            @Override
+            public void reset() {
+            }
+        };
+    }
+
+    private static void assertDoubleBounds(double expectedMin, double expectedMax, double... values) {
+        assertDoubleBounds(doubleLeaf(values), expectedMin, expectedMax);
+    }
+
+    private static void assertDoubleBounds(DoubleColumnFilterWriter writer, double expectedMin, double expectedMax) {
+        Assert.assertEquals(expectedMin, Double.longBitsToDouble(writer.getMinNormalizedValue()), 0.0);
+        Assert.assertEquals(expectedMax, Double.longBitsToDouble(writer.getMaxNormalizedValue()), 0.0);
+    }
+
+    private static void assertLongBounds(long expectedMin, long expectedMax, long... values) {
+        LongColumnFilterWriter writer = longLeaf(values);
+        Assert.assertEquals(expectedMin, writer.getMinNormalizedValue());
+        Assert.assertEquals(expectedMax, writer.getMaxNormalizedValue());
+    }
+
+    // x < c
+    private static IColumnRangeFilterEvaluatorFactory lt(IAObject c, AbstractColumnFilterWriter leaf) {
+        return new GTColumnFilterEvaluatorFactory(constant(c), min(c, leaf));
+    }
+
+    // x <= c
+    private static IColumnRangeFilterEvaluatorFactory le(IAObject c, AbstractColumnFilterWriter leaf) {
+        return new GEColumnFilterEvaluatorFactory(constant(c), min(c, leaf));
+    }
+
+    // x > c
+    private static IColumnRangeFilterEvaluatorFactory gt(IAObject c, AbstractColumnFilterWriter leaf) {
+        return new LTColumnFilterEvaluatorFactory(constant(c), max(c, leaf));
+    }
+
+    // x >= c
+    private static IColumnRangeFilterEvaluatorFactory ge(IAObject c, AbstractColumnFilterWriter leaf) {
+        return new LEColumnFilterEvaluatorFactory(constant(c), max(c, leaf));
+    }
+
+    // x = c
+    private static IColumnRangeFilterEvaluatorFactory eq(IAObject c, AbstractColumnFilterWriter leaf) {
+        return new ANDColumnFilterEvaluatorFactory(new GEColumnFilterEvaluatorFactory(constant(c), min(c, leaf)),
+                new LEColumnFilterEvaluatorFactory(constant(c), max(c, leaf)));
+    }
+
+    private static IColumnRangeFilterValueAccessorFactory constant(IAObject c) {
+        return ConstantColumnRangeFilterValueAccessorFactory.createFactory(c);
+    }
+
+    private static IColumnRangeFilterValueAccessorFactory min(IAObject c, AbstractColumnFilterWriter leaf) {
+        return bound(c.getType().getTypeTag(), true, leaf.getMinNormalizedValue());
+    }
+
+    private static IColumnRangeFilterValueAccessorFactory max(IAObject c, AbstractColumnFilterWriter leaf) {
+        return bound(c.getType().getTypeTag(), false, leaf.getMaxNormalizedValue());
+    }
+
+    private static IColumnRangeFilterValueAccessorFactory bound(ATypeTag typeTag, boolean min, long normalized) {
+        return provider -> {
+            ColumnRangeFilterValueAccessor accessor = new ColumnRangeFilterValueAccessor(0, typeTag, min);
+            accessor.setNormalizedValue(normalized);
+            return accessor;
+        };
+    }
+
+    private static boolean isRead(IColumnRangeFilterEvaluatorFactory filter) throws HyracksDataException {
+        return filter.create(null).evaluate();
+    }
+}
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/filter/ColumnRangeFilterBuilder.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/filter/ColumnRangeFilterBuilder.java
index 99cd1335be..71254d7cb1 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/filter/ColumnRangeFilterBuilder.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/utils/filter/ColumnRangeFilterBuilder.java
@@ -177,18 +177,19 @@ public class ColumnRangeFilterBuilder {
         return new ORColumnFilterEvaluatorFactory(left, right);
     }
 
+    // const <op> col is col <op'> const with the operands swapped, so the operator is mirrored, not negated
     private static ComparisonKind invert(ComparisonKind comparisonKind) {
         switch (comparisonKind) {
             case EQ:
                 return ComparisonKind.EQ;
             case LE:
-                return ComparisonKind.GT;
+                return ComparisonKind.GE;
             case GE:
-                return ComparisonKind.LT;
+                return ComparisonKind.LE;
             case LT:
-                return ComparisonKind.GE;
+                return ComparisonKind.GT;
             case GT:
-                return ComparisonKind.LE;
+                return ComparisonKind.LT;
             default:
                 throw new IllegalStateException("Unsupported comparison type: " + comparisonKind);
         }
@@ -199,8 +200,8 @@ public class ColumnRangeFilterBuilder {
             IColumnRangeFilterValueAccessorFactory max) {
 
         /*
-        * For a filter condition of the form col < const, the page will be read only if const >= min(col).
-        *  Similarly, for col <= const, the page will be read only if const > min(col).
+        * For a filter condition of the form col < const, the page will be read only if const > min(col).
+        *  Similarly, for col <= const, the page will be read only if const >= min(col).
         *  for col > const, the page will be read only if const < max(col).
         *  for col >= const, the page will be read only if const <= max(col).
         * */


(asterixdb) 11/13: [NO ISSUE][COMP] Fix CME in index-only ANN plan with cross-pollination

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit aff51e5c06a2df73206599520d2ac3b9bcabbb91
Author: Murtadha Hubail <mu...@couchbase.com>
AuthorDate: Wed Oct 7 19:14:34 2026 +0300

    [NO ISSUE][COMP] Fix CME in index-only ANN plan with cross-pollination
    
    The index-only branch held the search's primary key variables as a
    subList view of the unnest-map's variable list. Dropping the INCLUDE
    columns a query does not read restructures that list, so the
    cross-pollination dedup that iterates the view afterwards failed with
    ConcurrentModificationException whenever cross_pollination_m > 1 and an
    INCLUDE column went unread. Copy the keys instead.
    
    Ext-ref: MB-74445
    Generated-by: Claude Opus 5.5 (1M context) <no...@anthropic.com>
    Change-Id: I04207cff6c7ac258ef8f9a06015e411621f20544
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22011
    Tested-by: Murtadha Hubail <mh...@apache.org>
    Reviewed-by: Ali Alsuliman <al...@gmail.com>
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
---
 .../rules/am/VectorIndexAccessMethod.java          |  4 ++-
 .../queries_sqlpp/vector/VectorQueries.xml         |  5 ++++
 .../vtree-cross-pollination-include.1.ddl.sqlpp    | 32 ++++++++++++++++++++
 .../vtree-cross-pollination-include.2.update.sqlpp | 33 +++++++++++++++++++++
 .../vtree-cross-pollination-include.3.ddl.sqlpp    | 20 +++++++++++++
 .../vtree-cross-pollination-include.4.ddl.sqlpp    | 25 ++++++++++++++++
 .../vtree-cross-pollination-include.5.query.sqlpp  | 25 ++++++++++++++++
 .../vtree-cross-pollination-include.6.query.sqlpp  | 25 ++++++++++++++++
 .../vtree-cross-pollination-include.7.plans.sqlpp  | 30 +++++++++++++++++++
 .../vtree-cross-pollination-include.99.ddl.sqlpp   | 20 +++++++++++++
 .../vtree-cross-pollination-include.5.adm          |  3 ++
 .../vtree-cross-pollination-include.6.adm          |  3 ++
 .../vtree-cross-pollination-include.7.plan         | 34 ++++++++++++++++++++++
 .../vtree-cross-pollination-include.7.plan         | 34 ++++++++++++++++++++++
 .../vtree-cross-pollination-include.7.plan         | 34 ++++++++++++++++++++++
 15 files changed, 326 insertions(+), 1 deletion(-)

diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/VectorIndexAccessMethod.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/VectorIndexAccessMethod.java
index 033e44a940..70afab1921 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/VectorIndexAccessMethod.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/VectorIndexAccessMethod.java
@@ -406,7 +406,9 @@ public class VectorIndexAccessMethod implements IAccessMethod {
                 // referenced the old PK variable from the DataSourceScan needs to be redirected.
                 List<LogicalVariable> oldVars = dataSourceOp.getVariables();
                 int numPK = dataset.getPrimaryKeys().size();
-                List<LogicalVariable> newPkVars = unnestMap.getVariables().subList(0, numPK);
+                // A copy, not a view: step 4 below rewrites the INCLUDE tail of the search's variable list,
+                // which would invalidate a subList view still read by the cross-pollination dedup after it.
+                List<LogicalVariable> newPkVars = new ArrayList<>(unnestMap.getVariables().subList(0, numPK));
                 Map<LogicalVariable, LogicalVariable> pkSubstitution = new HashMap<>();
                 for (int i = 0; i < numPK; i++) {
                     pkSubstitution.put(oldVars.get(i), newPkVars.get(i));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/VectorQueries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/VectorQueries.xml
index 10141c5079..53a02154e6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/VectorQueries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/VectorQueries.xml
@@ -314,4 +314,9 @@
             <output-dir compare="Clean-JSON">vtree-unnest-not-indexable</output-dir>
         </compilation-unit>
     </test-case>
+    <test-case FilePath="vector">
+        <compilation-unit name="vtree-cross-pollination-include">
+            <output-dir compare="Clean-JSON">vtree-cross-pollination-include</output-dir>
+        </compilation-unit>
+    </test-case>
 </test-group>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.1.ddl.sqlpp
new file mode 100644
index 0000000000..75dc2f3cc6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.1.ddl.sqlpp
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// With cross_pollination_m > 1 an index-only ANN plan dedups the search's primary keys, and it does so
+// after the INCLUDE columns the query does not read have been dropped from the search's output. Both
+// must hold at once: a query reading no INCLUDE column, and one reading only some of them.
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+USE test;
+CREATE TYPE MovieType AS {
+  id: int,
+  year: int,
+  rating: int,
+  embedding: [double]
+};
+CREATE DATASET MovieCp(MovieType) PRIMARY KEY id;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.2.update.sqlpp
new file mode 100644
index 0000000000..876f982b84
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.2.update.sqlpp
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+// year = 2000 + id; ids 1..5 are nearest to [0,0,0,0], in id order.
+INSERT INTO MovieCp ([
+  {"id": 1, "year": 2001, "rating": 1, "embedding": [0.0, 0.0, 0.0, 0.1]},
+  {"id": 2, "year": 2002, "rating": 5, "embedding": [0.0, 0.0, 0.0, 0.2]},
+  {"id": 3, "year": 2003, "rating": 1, "embedding": [0.0, 0.0, 0.0, 0.3]},
+  {"id": 4, "year": 2004, "rating": 5, "embedding": [0.0, 0.0, 0.0, 0.4]},
+  {"id": 5, "year": 2005, "rating": 1, "embedding": [0.0, 0.0, 0.0, 0.5]},
+  {"id": 6, "year": 2006, "rating": 5, "embedding": [10.0, 10.0, 10.0, 0.1]},
+  {"id": 7, "year": 2007, "rating": 1, "embedding": [10.0, 10.0, 10.0, 0.2]},
+  {"id": 8, "year": 2008, "rating": 5, "embedding": [10.0, 10.0, 10.0, 0.3]},
+  {"id": 9, "year": 2009, "rating": 1, "embedding": [10.0, 10.0, 10.0, 0.4]},
+  {"id": 10, "year": 2010, "rating": 5, "embedding": [10.0, 10.0, 10.0, 0.5]}
+]);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.3.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.3.ddl.sqlpp
new file mode 100644
index 0000000000..06db33a4ab
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.3.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+ANALYZE DATASET test.MovieCp WITH {"sample-seed": 1000};
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.4.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.4.ddl.sqlpp
new file mode 100644
index 0000000000..f5cc2b346a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.4.ddl.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+CREATE INDEX idx_emb
+  ON MovieCp(embedding VECTOR)
+  INCLUDE (year, rating)
+  TYPE VTREE
+  WITH { "dimension": 4, "similarity": "euclidean", "num_clusters": 2, "seed": 42, "cross_pollination_m": 2 };
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.query.sqlpp
new file mode 100644
index 0000000000..d50de65550
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+// Reads no INCLUDE column, so every one of them is dropped from the search before the dedup is built.
+SELECT VALUE m.id
+FROM MovieCp m
+ORDER BY ann_distance(m.embedding, [0.0, 0.0, 0.0, 0.0], "euclidean", 1.0)
+LIMIT 3;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.query.sqlpp
new file mode 100644
index 0000000000..c9a1ca73eb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.query.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+USE test;
+// Reads one of the two INCLUDE columns, so the search keeps year and drops rating.
+SELECT m.id, m.year
+FROM MovieCp m
+ORDER BY ann_distance(m.embedding, [0.0, 0.0, 0.0, 0.0], "euclidean", 1.0)
+LIMIT 3;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plans.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plans.sqlpp
new file mode 100644
index 0000000000..76f7133cf0
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plans.sqlpp
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- param compile-only:string=true
+-- param optimized-logical-plan:string=true
+
+// CBO cost estimates vary with the cluster shape, which differs between a local run and CI.
+SET `compiler.cbo` "false";
+
+// The .5 query as a plan assertion: index-only, with the dedup on the search's primary key.
+SELECT VALUE m.id
+FROM test.MovieCp m
+ORDER BY ann_distance(m.embedding, [0.0, 0.0, 0.0, 0.0], "euclidean", 1.0)
+LIMIT 3;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.99.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.99.ddl.sqlpp
new file mode 100644
index 0000000000..20dc6fde5e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.99.ddl.sqlpp
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+DROP DATAVERSE test IF EXISTS;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.adm
new file mode 100644
index 0000000000..01e79c32a8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.5.adm
@@ -0,0 +1,3 @@
+1
+2
+3
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.adm
new file mode 100644
index 0000000000..3c19a2375c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.6.adm
@@ -0,0 +1,3 @@
+{ "id": 1, "year": 2001 }
+{ "id": 2, "year": 2002 }
+{ "id": 3, "year": 2003 }
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
new file mode 100644
index 0000000000..92db8c42eb
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
@@ -0,0 +1,34 @@
+distribute result [$$28]
+-- DISTRIBUTE_RESULT  |UNPARTITIONED|
+  exchange
+  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
+    limit 3
+    -- STREAM_LIMIT  |UNPARTITIONED|
+      project ([$$28])
+      -- STREAM_PROJECT  |PARTITIONED|
+        exchange
+        -- SORT_MERGE_EXCHANGE [$$29(ASC) ]  |PARTITIONED|
+          limit 3
+          -- STREAM_LIMIT  |PARTITIONED|
+            exchange
+            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+              order (topK: 3) (ASC, $$29)
+              -- STABLE_SORT [topK: 3] [$$29(ASC)]  |PARTITIONED|
+                exchange
+                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                  distinct ([$$28])
+                  -- PRE_SORTED_DISTINCT_BY  |PARTITIONED|
+                    exchange
+                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                      order (ASC, $$28)
+                      -- STABLE_SORT [$$28(ASC)]  |PARTITIONED|
+                        exchange
+                        -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                          unnest-map [$$28, $$29] <- index-search("idx_emb", 8, "Default", "test", "MovieCp", false, false, true, 5, $$23, $$24, $$25, $$26, $$27)
+                          -- VECTOR_SEARCH  |PARTITIONED|
+                            exchange
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              assign [$$23, $$24, $$25, $$26, $$27] <- [array: [ 0.0, 0.0, 0.0, 0.0 ], 3, "euclidean", 1.0, 1]
+                              -- ASSIGN  |PARTITIONED|
+                                empty-tuple-source
+                                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_full_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_full_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
new file mode 100644
index 0000000000..e9ea67a430
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_full_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
@@ -0,0 +1,34 @@
+distribute result [$$28]
+-- DISTRIBUTE_RESULT  |UNPARTITIONED|
+  exchange
+  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
+    limit 3
+    -- STREAM_LIMIT  |UNPARTITIONED|
+      project ([$$28])
+      -- STREAM_PROJECT  |PARTITIONED|
+        exchange
+        -- SORT_MERGE_EXCHANGE [$$29(ASC) ]  |PARTITIONED|
+          limit 3
+          -- STREAM_LIMIT  |PARTITIONED|
+            exchange
+            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+              order (topK: 3) (ASC, $$29)
+              -- STABLE_SORT [topK: 3] [$$29(ASC)]  |PARTITIONED|
+                exchange
+                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                  distinct ([$$28])
+                  -- PRE_SORTED_DISTINCT_BY  |PARTITIONED|
+                    exchange
+                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                      order (ASC, $$28)
+                      -- STABLE_SORT [$$28(ASC)]  |PARTITIONED|
+                        exchange
+                        -- HASH_PARTITION_EXCHANGE [$$28]  |PARTITIONED|
+                          unnest-map [$$28, $$29] <- index-search("idx_emb", 8, "Default", "test", "MovieCp", false, false, true, 5, $$23, $$24, $$25, $$26, $$27)
+                          -- VECTOR_SEARCH  |PARTITIONED|
+                            exchange
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              assign [$$23, $$24, $$25, $$26, $$27] <- [array: [ 0.0, 0.0, 0.0, 0.0 ], 3, "euclidean", 1.0, 1]
+                              -- ASSIGN  |PARTITIONED|
+                                empty-tuple-source
+                                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_less_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan b/asterixdb/asterix-app/src/test/resources/runtimets/results_less_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
new file mode 100644
index 0000000000..e9ea67a430
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_less_parallelism/vector/vtree-cross-pollination-include/vtree-cross-pollination-include.7.plan
@@ -0,0 +1,34 @@
+distribute result [$$28]
+-- DISTRIBUTE_RESULT  |UNPARTITIONED|
+  exchange
+  -- ONE_TO_ONE_EXCHANGE  |UNPARTITIONED|
+    limit 3
+    -- STREAM_LIMIT  |UNPARTITIONED|
+      project ([$$28])
+      -- STREAM_PROJECT  |PARTITIONED|
+        exchange
+        -- SORT_MERGE_EXCHANGE [$$29(ASC) ]  |PARTITIONED|
+          limit 3
+          -- STREAM_LIMIT  |PARTITIONED|
+            exchange
+            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+              order (topK: 3) (ASC, $$29)
+              -- STABLE_SORT [topK: 3] [$$29(ASC)]  |PARTITIONED|
+                exchange
+                -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                  distinct ([$$28])
+                  -- PRE_SORTED_DISTINCT_BY  |PARTITIONED|
+                    exchange
+                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                      order (ASC, $$28)
+                      -- STABLE_SORT [$$28(ASC)]  |PARTITIONED|
+                        exchange
+                        -- HASH_PARTITION_EXCHANGE [$$28]  |PARTITIONED|
+                          unnest-map [$$28, $$29] <- index-search("idx_emb", 8, "Default", "test", "MovieCp", false, false, true, 5, $$23, $$24, $$25, $$26, $$27)
+                          -- VECTOR_SEARCH  |PARTITIONED|
+                            exchange
+                            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+                              assign [$$23, $$24, $$25, $$26, $$27] <- [array: [ 0.0, 0.0, 0.0, 0.0 ], 3, "euclidean", 1.0, 1]
+                              -- ASSIGN  |PARTITIONED|
+                                empty-tuple-source
+                                -- EMPTY_TUPLE_SOURCE  |PARTITIONED|


(asterixdb) 02/13: Merge branch 'gerrit/trinity' into 'gerrit/morpheus'

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 2a1f22076da556f853043461154605a8126014c9
Merge: 030851f0c9 9ebad090a4
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Wed Oct 7 10:28:59 2026 -0400

    Merge branch 'gerrit/trinity' into 'gerrit/morpheus'
    
     * [ASTERIXDB-3851][NET][BP] Identify the peer on inter-node TLS
       (MB-74402)
    
    Conflicts take the form of a1a8b9e886 on master, which already builds on
    the mutual-auth API this branch has, without its @AiProvenance.
    
    Ext-ref: MB-74402
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: If390b3d773b052a83305499078c70ebca0970eb6

 CLAUDE.md                                          |  79 +++----
 .../api/cluster_state_1/cluster_state_1.1.regexadm |   3 +
 .../cluster_state_1_full.1.regexadm                |   3 +
 .../cluster_state_1_less.1.regexadm                |   3 +
 .../src/test/resources/security/cc/cc.crt          |  44 ++--
 .../src/test/resources/security/cc/cc.jks          | Bin 2310 -> 2418 bytes
 .../src/test/resources/security/cc/cc.p12          | Bin 2565 -> 2712 bytes
 .../test/resources/security/nc1/asterix_nc1.crt    |  44 ++--
 .../test/resources/security/nc1/asterix_nc1.jks    | Bin 2320 -> 2428 bytes
 .../test/resources/security/nc1/asterix_nc1.p12    | Bin 2573 -> 2720 bytes
 .../test/resources/security/nc2/asterix_nc2.crt    |  44 ++--
 .../test/resources/security/nc2/asterix_nc2.jks    | Bin 2322 -> 2430 bytes
 .../test/resources/security/nc2/asterix_nc2.p12    | Bin 2573 -> 2720 bytes
 .../apache/asterix/metadata/RMIClientFactory.java  |  30 ++-
 .../api/network/INetworkSecurityConfig.java        |  22 ++
 .../api/network/INetworkSecurityManager.java       |  18 +-
 .../control/cc/ClusterControllerService.java       |   5 +-
 .../common/controllers/ControllerConfig.java       |  36 +++-
 .../hyracks/control/nc/NodeControllerService.java  |   5 +-
 hyracks-fullstack/hyracks/hyracks-ipc/pom.xml      |  12 ++
 .../ipc/security/NetworkSecurityConfig.java        |  35 ++-
 .../ipc/security/NetworkSecurityManager.java       |  29 ++-
 .../ipc/sockets/SslSocketChannelFactory.java       |  27 ++-
 .../hyracks/ipc/tests/SslPeerIdentityTest.java     | 238 +++++++++++++++++++++
 24 files changed, 537 insertions(+), 140 deletions(-)

diff --cc asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/RMIClientFactory.java
index da802a74f0,55c393c276..10c1118bd6
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/RMIClientFactory.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/RMIClientFactory.java
@@@ -66,9 -68,11 +68,11 @@@ public class RMIClientFactory implement
      private static class RMITrustedClientSSLSocketFactory extends SSLSocketFactory {
  
          protected SSLSocketFactory factory;
+         private final boolean verifyPeerIdentity;
  
          public RMITrustedClientSSLSocketFactory(INetworkSecurityConfig config) {
 -            this.factory = NetworkSecurityManager.newSSLContext(config).getSocketFactory();
 +            this.factory = NetworkSecurityManager.newSSLContext(config, false).getSocketFactory();
+             this.verifyPeerIdentity = config.verifyRmiPeerIdentity();
          }
  
          public Socket createSocket(InetAddress host, int port) throws IOException {
diff --cc hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityConfig.java
index 2e00e4d108,d71f188a5b..1da8dea285
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityConfig.java
@@@ -35,18 -33,28 +35,40 @@@ public interface INetworkSecurityConfi
       */
      boolean isSslEnabled();
  
 +    /**
 +     * Indicates if any authentication being performed should mutual (e.g. mTLS, SCRAM-SHA)
 +     *
 +     * @return true if mutual auth should be used. Otherwise false.
 +     */
 +    boolean useMutualAuth();
 +
+     /**
+      * Indicates if the certificate a peer presents on a secured cluster connection must identify the address that
+      * peer was reached at. When this is false the peer's chain is still validated against the trust store, but any
+      * host holding a certificate it validates is accepted in place of the node that was dialled.
+      *
+      * @return true if the peer's identity should be verified. Otherwise false.
+      */
+     default boolean verifyPeerIdentity() {
+         return true;
+     }
+ 
+     /**
+      * As {@link #verifyPeerIdentity()}, for RMI connections. These are separate because RMI reaches a node by the
+      * host recorded in the exported stub ({@code java.rmi.server.hostname}), which is configured independently of
+      * the address the cluster's own connections use and so may be covered by a different name, or none.
+      *
+      * @return true if the peer's identity should be verified on RMI connections. Otherwise false.
+      */
+     default boolean verifyRmiPeerIdentity() {
+         return true;
+     }
+ 
 +    /**
 +     * Indicates how to handle client authentication when ssl is enabled
 +     */
 +    ClientAuth getClientAuth();
 +
      /**
       * Gets the key store to be used for secured connections
       *
diff --cc hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityManager.java
index 8462f915d1,90bd171c30..ac937304a6
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityManager.java
@@@ -28,14 -30,26 +30,26 @@@ public interface INetworkSecurityManage
       *
       * @return a new ssl context
       */
 -    SSLContext newSSLContext();
 +    SSLContext newSSLContext(boolean clientMode);
  
      /**
-      * Creates a new ssl engine based on the current configuration of this {@link INetworkSecurityManager}
+      * Creates a new server-mode ssl engine based on the current configuration of this
+      * {@link INetworkSecurityManager}
+      *
+      * @return a new ssl engine
+      */
+     SSLEngine newServerSSLEngine();
+ 
+     /**
+      * Creates a new client-mode ssl engine based on the current configuration of this
+      * {@link INetworkSecurityManager}. The engine verifies that the certificate the peer presents identifies
+      * {@code peer}; validating the chain against the trust store on its own leaves any holder of a trusted
+      * certificate able to answer in place of the node that was dialled.
       *
+      * @param peer the address this connection was made to
       * @return a new ssl engine
       */
-     SSLEngine newSSLEngine(boolean clientMode);
+     SSLEngine newClientSSLEngine(InetSocketAddress peer);
  
      /**
       * Sets the configuration to be used for this {@link INetworkSecurityManager}
diff --cc hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
index d7667b43a4,00fd85f7b5..70313ea0b1
--- a/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
@@@ -82,9 -82,17 +82,21 @@@
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
      </dependency>
+     <dependency>
+       <groupId>org.bouncycastle</groupId>
+       <artifactId>bcpkix-jdk18on</artifactId>
+       <version>1.85</version>
+       <scope>test</scope>
+     </dependency>
+     <dependency>
+       <groupId>org.bouncycastle</groupId>
+       <artifactId>bcprov-jdk18on</artifactId>
+       <version>1.85.2</version>
+       <scope>test</scope>
+     </dependency>
 +    <dependency>
 +      <groupId>io.netty</groupId>
 +      <artifactId>netty-handler</artifactId>
 +    </dependency>
    </dependencies>
  </project>
diff --cc hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityConfig.java
index 03cdbe9c66,ca9627103b..7d5b474d82
--- a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityConfig.java
@@@ -69,16 -84,16 +86,26 @@@ public class NetworkSecurityConfig impl
          return sslEnabled;
      }
  
 +    @Override
 +    public boolean useMutualAuth() {
 +        return false;
 +    }
 +
+     @Override
+     public boolean verifyPeerIdentity() {
+         return verifyPeerIdentity;
+     }
+ 
+     @Override
+     public boolean verifyRmiPeerIdentity() {
+         return verifyRmiPeerIdentity;
+     }
+ 
 +    @Override
 +    public ClientAuth getClientAuth() {
 +        return ClientAuth.NONE;
 +    }
 +
      @Override
      public File getKeyStoreFile() {
          return keyStoreFile;
diff --cc hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityManager.java
index 7a0e48292a,f6a35c4ce4..325ec3fdf4
--- a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityManager.java
@@@ -18,8 -18,8 +18,9 @@@
   */
  package org.apache.hyracks.ipc.security;
  
 +import java.io.File;
  import java.io.FileInputStream;
+ import java.net.InetSocketAddress;
  import java.security.KeyStore;
  import java.security.SecureRandom;
  
@@@ -38,7 -39,8 +40,8 @@@ public class NetworkSecurityManager imp
  
      private volatile INetworkSecurityConfig config;
      protected final ISocketChannelFactory sslSocketFactory;
 -    public static final String TSL_VERSION = "TLSv1.2";
 +    public static final String TLS_VERSION = "TLSv1.2";
+     public static final String ENDPOINT_IDENTIFICATION_ALGORITHM = "HTTPS";
  
      public NetworkSecurityManager(INetworkSecurityConfig config) {
          this.config = config;
@@@ -51,11 -53,28 +54,29 @@@
      }
  
      @Override
-     public SSLEngine newSSLEngine(boolean clientMode) {
+     public SSLEngine newServerSSLEngine() {
          try {
-             boolean useClientCerts = clientMode && config.useMutualAuth();
-             SSLEngine sslEngine = newSSLContext(useClientCerts).createSSLEngine();
-             sslEngine.setUseClientMode(clientMode);
 -            SSLEngine sslEngine = newSSLContext().createSSLEngine();
++            SSLEngine sslEngine = newSSLContext(false).createSSLEngine();
+             sslEngine.setUseClientMode(false);
+             return sslEngine;
+         } catch (Exception ex) {
+             throw new IllegalStateException("Failed to create SSLEngine", ex);
+         }
+     }
+ 
+     @Override
+     public SSLEngine newClientSSLEngine(InetSocketAddress peer) {
+         try {
+             // the peer host is the name matched against the certificate, so an engine created without it cannot
+             // identify anything- the handshake then fails outright rather than skipping the check
 -            SSLEngine sslEngine = newSSLContext().createSSLEngine(peer.getHostString(), peer.getPort());
++            SSLEngine sslEngine =
++                    newSSLContext(config.useMutualAuth()).createSSLEngine(peer.getHostString(), peer.getPort());
+             sslEngine.setUseClientMode(true);
+             if (config.verifyPeerIdentity()) {
+                 SSLParameters sslParameters = sslEngine.getSSLParameters();
+                 sslParameters.setEndpointIdentificationAlgorithm(ENDPOINT_IDENTIFICATION_ALGORITHM);
+                 sslEngine.setSSLParameters(sslParameters);
+             }
              return sslEngine;
          } catch (Exception ex) {
              throw new IllegalStateException("Failed to create SSLEngine", ex);


(asterixdb) 12/13: [ASTERIXDB-3949][STO] Merge secondary indexes of atomic datasets

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 7f16ff6907b49a0f0065c6da7873c719208b4183
Author: Ritik Raj <ra...@gmail.com>
AuthorDate: Thu Oct 8 14:34:11 2026 +0530

    [ASTERIXDB-3949][STO] Merge secondary indexes of atomic datasets
    
    Secondary indexes of atomic datasets were never merged. For these
    datasets, merges are scheduled once the statement commits, and that step
    only looked at the primary index. Every statement therefore left one
    more disk component in each secondary index.
    
    Ext-ref: MB-74490
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: Idd0eb0988e8b936a594afb350ced4dbc21f062fa
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22028
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Ritik Raj <ri...@couchbase.com>
    Reviewed-by: Murtadha Hubail <mh...@apache.org>
---
 .../asterix/app/message/EnableMergeMessage.java    |  4 +---
 .../atomic-secondary-merge.1.ddl.sqlpp             | 26 ++++++++++++++++++++++
 .../atomic-secondary-merge.2.update.sqlpp          | 21 +++++++++++++++++
 .../atomic-secondary-merge.3.update.sqlpp          | 21 +++++++++++++++++
 .../atomic-secondary-merge.4.update.sqlpp          | 21 +++++++++++++++++
 .../atomic-secondary-merge.5.update.sqlpp          | 21 +++++++++++++++++
 .../atomic-secondary-merge.6.update.sqlpp          | 21 +++++++++++++++++
 .../atomic-secondary-merge.7.pollquery.sqlpp       | 25 +++++++++++++++++++++
 .../atomic-secondary-merge.8.ddl.sqlpp             | 19 ++++++++++++++++
 .../atomic-secondary-merge.7.adm                   |  1 +
 .../test/resources/runtimets/testsuite_storage.xml |  5 +++++
 .../transaction/AtomicNoWALTransactionContext.java | 10 ++++-----
 12 files changed, 186 insertions(+), 9 deletions(-)

diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/EnableMergeMessage.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/EnableMergeMessage.java
index 050ca381dd..128a69d108 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/EnableMergeMessage.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/message/EnableMergeMessage.java
@@ -40,9 +40,7 @@ public class EnableMergeMessage implements INcAddressedMessage {
     public void handle(INcApplicationContext appCtx) throws HyracksDataException, InterruptedException {
         IDatasetLifecycleManager datasetLifecycleManager = appCtx.getDatasetLifecycleManager();
         for (IndexInfo indexInfo : datasetLifecycleManager.getDatasetInfo(datasetId).getIndexes().values()) {
-            if (indexInfo.getIndex().isPrimaryIndex()) {
-                indexInfo.getIndex().getMergePolicy().diskComponentAdded(indexInfo.getIndex(), false);;
-            }
+            indexInfo.getIndex().getMergePolicy().diskComponentAdded(indexInfo.getIndex(), false);
         }
     }
 
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.1.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.1.ddl.sqlpp
new file mode 100644
index 0000000000..cd5c0c26c5
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.1.ddl.sqlpp
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE DATASET ds PRIMARY KEY (id: int);
+
+CREATE INDEX idx_v ON ds (v: int);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.2.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.2.update.sqlpp
new file mode 100644
index 0000000000..ee066211d6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.2.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+USE test;
+
+UPSERT INTO ds (FROM range(1, 100) r SELECT r AS id, r AS v);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.3.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.3.update.sqlpp
new file mode 100644
index 0000000000..f226f7edfd
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.3.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+USE test;
+
+UPSERT INTO ds (FROM range(1, 100) r SELECT r AS id, r + 3 AS v);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.4.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.4.update.sqlpp
new file mode 100644
index 0000000000..c7baa924e8
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.4.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+USE test;
+
+UPSERT INTO ds (FROM range(1, 100) r SELECT r AS id, r + 4 AS v);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.5.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.5.update.sqlpp
new file mode 100644
index 0000000000..70d7273bee
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.5.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+USE test;
+
+UPSERT INTO ds (FROM range(1, 100) r SELECT r AS id, r + 5 AS v);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.6.update.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.6.update.sqlpp
new file mode 100644
index 0000000000..d328d885b1
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.6.update.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+USE test;
+
+UPSERT INTO ds (FROM range(1, 100) r SELECT r AS id, r + 6 AS v);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.7.pollquery.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.7.pollquery.sqlpp
new file mode 100644
index 0000000000..07021d3813
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.7.pollquery.sqlpp
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+-- polltimeoutsecs=60
+SET `import-private-functions` `true`;
+USE test;
+
+LET sec = (FROM storage_components('test', 'ds') r WHERE r.`path` LIKE '%/idx_v' SELECT VALUE r)
+SELECT VALUE array_count(sec) > 0
+    AND (EVERY r IN sec SATISFIES (SOME c IN r.components SATISFIES c.`min` < c.`max`));
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.8.ddl.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.8.ddl.sqlpp
new file mode 100644
index 0000000000..39d501cd10
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/storage/atomic-secondary-merge/atomic-secondary-merge.8.ddl.sqlpp
@@ -0,0 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+DROP DATAVERSE test;
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/storage/atomic-secondary-merge/atomic-secondary-merge.7.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/storage/atomic-secondary-merge/atomic-secondary-merge.7.adm
new file mode 100644
index 0000000000..27ba77ddaf
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/storage/atomic-secondary-merge/atomic-secondary-merge.7.adm
@@ -0,0 +1 @@
+true
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_storage.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_storage.xml
index 4f2797f2c4..6de002e3fd 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_storage.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_storage.xml
@@ -18,6 +18,11 @@
  !-->
 <test-suite xmlns="urn:xml.testframework.asterix.apache.org" ResultOffsetPath="results" QueryOffsetPath="queries_sqlpp" QueryFileExtension=".sqlpp" SourceLocation="true">
   <test-group name="storage">
+    <test-case FilePath="storage">
+      <compilation-unit name="atomic-secondary-merge">
+        <output-dir compare="Text">atomic-secondary-merge</output-dir>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="storage">
       <compilation-unit name="dataset-checkpoint">
         <output-dir compare="Text">dataset-checkpoint</output-dir>
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/AtomicNoWALTransactionContext.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/AtomicNoWALTransactionContext.java
index a743bb12bd..065a5a86ee 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/AtomicNoWALTransactionContext.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/transaction/AtomicNoWALTransactionContext.java
@@ -173,12 +173,10 @@ public class AtomicNoWALTransactionContext extends AtomicTransactionContext {
         for (ILSMOperationTracker opTrackerRef : modifiedIndexes) {
             PrimaryIndexOperationTracker primaryIndexOpTracker = (PrimaryIndexOperationTracker) opTrackerRef;
             for (IndexInfo indexInfo : primaryIndexOpTracker.getDatasetInfo().getIndexes().values()) {
-                if (indexInfo.getIndex().isPrimaryIndex()) {
-                    try {
-                        indexInfo.getIndex().getMergePolicy().diskComponentAdded(indexInfo.getIndex(), false);
-                    } catch (HyracksDataException e) {
-                        throw new ACIDException(e);
-                    }
+                try {
+                    indexInfo.getIndex().getMergePolicy().diskComponentAdded(indexInfo.getIndex(), false);
+                } catch (HyracksDataException e) {
+                    throw new ACIDException(e);
                 }
             }
         }


(asterixdb) 01/13: [ASTERIXDB-3851][NET][BP] Identify the peer on inter-node TLS

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 9ebad090a457ab2258c67efa6457cbe26455ef7c
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Tue Sep 15 21:06:39 2026 -0400

    [ASTERIXDB-3851][NET][BP] Identify the peer on inter-node TLS
    
    - user model changes: no
    - storage format changes: no
    - interface changes: yes
    
    Details: A client-mode SSLEngine was created with no peer host and no
    endpoint identification algorithm, so a connection validated the peer's
    chain against the trust store but never the identity its certificate was
    issued to. Any holder of a trusted certificate was accepted in place of
    the node that was dialled, and where the trust store is a CA shared by
    the cluster, one node's certificate was enough to answer for another.
    The RMI metadata client was open the same way through a plain
    SSLSocketFactory.
    
    The engine has no name of its own to match on, so the client engine is
    now created for the address its channel was connected to, and the server
    and client engines are separated so that a client engine without a peer
    cannot be asked for.
    
    ssl.verify.peer.identity, on by default, relaxes the checks for a
    deployment whose certificates cannot name the addresses its nodes are
    reached at. ssl.cluster.verify.peer.identity and
    ssl.rmi.verify.peer.identity take it as their default and can be set on
    their own, because RMI reaches a node by the host recorded in the
    exported stub, set by java.rmi.server.hostname independently of the
    address the cluster's own connections use; without them an RMI-only
    mismatch could only be answered by relaxing the data and replication
    channels along with it.
    
    The test certificates carried no subjectAltName and so could never have
    identified anything; they are re-issued from the existing test CA with
    the loopback names the ssl test configurations use.
    
    Adapted to this branch: it has no mutual authentication and no
    client-mode variant of newSSLContext(), so both engines are built from
    newSSLContext() as newSSLEngine() was; hyracks-ipc does not depend on
    netty here, and ControllerConfig has no CLOUD_DEPLOYMENT option to sit
    beside.
    
    The @AiProvenance annotations the original carried are left off, as they
    have since been removed from master; CLAUDE.md here is brought in line
    with master to say so, and picks up its notes on brief commit bodies and
    comments.
    
    (cherry picked from commit a1a8b9e88663019f5d59705774b47dc55b4a0db6)
    
    Ext-ref: MB-74402
    Generated-by: Claude Opus 5 <no...@anthropic.com>
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: I9dd86f095f6a6c840281bda95e29fed4ee4cac91
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21999
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Michael Blow <mb...@apache.org>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Ian Maxon <im...@apache.org>
    Reviewed-by: Hussain Towaileb <hu...@gmail.com>
---
 CLAUDE.md                                          |  79 +++----
 .../api/cluster_state_1/cluster_state_1.1.regexadm |   3 +
 .../cluster_state_1_full.1.regexadm                |   3 +
 .../cluster_state_1_less.1.regexadm                |   3 +
 .../src/test/resources/security/cc/cc.crt          |  44 ++--
 .../src/test/resources/security/cc/cc.jks          | Bin 2310 -> 2418 bytes
 .../src/test/resources/security/cc/cc.p12          | Bin 2565 -> 2712 bytes
 .../test/resources/security/nc1/asterix_nc1.crt    |  44 ++--
 .../test/resources/security/nc1/asterix_nc1.jks    | Bin 2320 -> 2428 bytes
 .../test/resources/security/nc1/asterix_nc1.p12    | Bin 2573 -> 2720 bytes
 .../test/resources/security/nc2/asterix_nc2.crt    |  44 ++--
 .../test/resources/security/nc2/asterix_nc2.jks    | Bin 2322 -> 2430 bytes
 .../test/resources/security/nc2/asterix_nc2.p12    | Bin 2573 -> 2720 bytes
 .../apache/asterix/metadata/RMIClientFactory.java  |  30 ++-
 .../api/network/INetworkSecurityConfig.java        |  22 ++
 .../api/network/INetworkSecurityManager.java       |  18 +-
 .../control/cc/ClusterControllerService.java       |   5 +-
 .../common/controllers/ControllerConfig.java       |  36 +++-
 .../hyracks/control/nc/NodeControllerService.java  |   5 +-
 hyracks-fullstack/hyracks/hyracks-ipc/pom.xml      |  12 ++
 .../ipc/security/NetworkSecurityConfig.java        |  35 ++-
 .../ipc/security/NetworkSecurityManager.java       |  28 ++-
 .../ipc/sockets/SslSocketChannelFactory.java       |  29 ++-
 .../hyracks/ipc/tests/SslPeerIdentityTest.java     | 238 +++++++++++++++++++++
 24 files changed, 537 insertions(+), 141 deletions(-)

diff --git a/CLAUDE.md b/CLAUDE.md
index 93bd78016c..b604fda7e4 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -128,58 +128,27 @@ original:
 git log -1 --format=%B | grep -c '^Change-Id:'
 ```
 
-## AI Provenance Annotation
-
-**When you (an AI agent) generate or assist with Java code in this tree, annotate it with
-`@AiProvenance`.** This records which model and tool produced the code so the contribution is
-auditable. The annotation is defined *here*, in this repository.
-
-- **Annotation**: `org.apache.hyracks.util.annotations.AiProvenance` — source at
-  `hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/annotations/AiProvenance.java`.
-  It is on the classpath of every module that depends on `hyracks-util` (effectively all of them).
-- **`@Retention(SOURCE)`** — documentation only; stripped at compile time, so no runtime or bytecode
-  cost. The repeatable container `@AiProvenances` is `RUNTIME`-retained for tools that scan class
-  files.
-- **Applies to**: types, methods, constructors, fields, and local variables.
-
-### Attributes
-
-| Attribute | Required | Values |
-|-----------|----------|--------|
-| `agent` | yes | `AiProvenance.Agent` — the model that did the work (e.g. `CLAUDE_OPUS_5`, `CLAUDE_SONNET_4_6`) |
-| `tool` | yes | `AiProvenance.Tool` — the invocation surface (e.g. `CLAUDE_CODE_CLI`, `CLAUDE_CODE_UI`, `GITHUB_COPILOT`) |
-| `contributionKind` | no (default `GENERATED`) | `GENERATED`, `ASSISTED`, `REFACTORED`, `TEST_GENERATED`, `DOC_GENERATED` |
-| `notes` | no | free-text, e.g. what changed or why |
-
-### How to inject it
-
-1. **Pick the narrowest element** that captures the AI contribution: annotate the **type** only when
-   the **whole class** is AI-authored. When AI adds or rewrites individual **methods** (or a
-   **field**/**constructor**) within an otherwise human-authored class, annotate each of those
-   **methods** — do **not** promote the annotation to the type level.
-2. **Match `agent` to the model actually used**, and `tool` to the surface: the `claude` CLI and the
-   Claude Code desktop/IDE integrations are `CLAUDE_CODE_CLI`; the Code tab in the Claude web app is
-   `CLAUDE_CODE_UI`; Copilot-in-IDE is `GITHUB_COPILOT`.
-3. **Choose `contributionKind`** honestly: `GENERATED` (from scratch), `ASSISTED` (human-led,
-   AI-suggested), `REFACTORED` (rewriting existing code), `TEST_GENERATED`, `DOC_GENERATED`.
-4. **Stack annotations** (it is `@Repeatable`) to record history — e.g. generated by one model then
-   refactored by another.
-5. **Import style**: either static-import the constants for brevity, or import the type and qualify
-   (`AiProvenance.Agent.X`). Both are used in-tree.
-
-If a model you used is missing from the `Agent`/`Tool`/`Provider` enums, **add it to
-`AiProvenance.java`** rather than falling back to `OTHER`.
-
-### Example
-
-In-tree usages on this branch include `hyracks-fullstack/hyracks/hyracks-util/.../Span.java`
-(type-level, `REFACTORED`), `hyracks-fullstack/hyracks/hyracks-util/.../SpanTest.java`, and
-`asterixdb/asterix-external-data/.../evaluators/StringJsonParseEval.java`.
-
-```java
-import org.apache.hyracks.util.annotations.AiProvenance;
-
-@AiProvenance(agent = AiProvenance.Agent.CLAUDE_OPUS_5, tool = AiProvenance.Tool.CLAUDE_CODE_CLI,
-        contributionKind = AiProvenance.ContributionKind.GENERATED, notes = "Initial implementation")
-public final class ExampleHelper { ... }
-```
+### Keep the body short
+
+The body says **why** — the defect, the constraint, the reason the obvious approach was rejected.
+It is not a narration of the diff: what changed is already in the diff, and restating it hunk by
+hunk only leaves two accounts to keep in step. A couple of sentences is usually the right length;
+a file-by-file tour is not.
+
+## Code Comments
+
+Comment the **why**, never the **what**. The code already states what it does, and a comment that
+merely repeats it is a second rein on the same bit — it adds no control and goes slack the moment
+the code moves. Reserve comments for what a reader cannot recover from the code itself: why a
+non-obvious approach was chosen, which defect or edge case a guard exists for, an invariant a
+caller must uphold, a workaround and the upstream issue it waits on.
+
+Javadoc describing contract — parameters, return values, thrown exceptions, threading expectations
+— is not "what" commentary and is welcome.
+
+## AI Contributions
+
+Record an AI contribution with the `Generated-by:` trailer only. **Do not add `@AiProvenance`**: the
+annotation and every use of it have been removed on `master`, so a new use compiles on this branch
+and then breaks the first merge that carries it upward. The uses already in this tree are left
+where they sit; the upward merges drop them.
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
index 7db9ee1dd6..251a2c63f9 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
@@ -54,7 +54,10 @@
     "replication\.log\.buffer\.pagesize" : 131072,
     "replication\.strategy" : "none",
     "replication\.timeout" : 120,
+    "ssl\.cluster\.verify\.peer\.identity" : true,
     "ssl\.enabled" : false,
+    "ssl\.rmi\.verify\.peer\.identity" : true,
+    "ssl\.verify\.peer\.identity" : true,
     "storage.buffercache.pagesize" : 32768,
     "storage.compression.block" : "snappy",
     "storage.global.cleanup.timeout" : 600,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
index 1c6f3432e5..fd93d150d7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
@@ -54,7 +54,10 @@
     "replication\.log\.buffer\.pagesize" : 131072,
     "replication\.strategy" : "none",
     "replication\.timeout" : 120,
+    "ssl\.cluster\.verify\.peer\.identity" : true,
     "ssl\.enabled" : false,
+    "ssl\.rmi\.verify\.peer\.identity" : true,
+    "ssl\.verify\.peer\.identity" : true,
     "storage.buffercache.pagesize" : 32768,
     "storage.compression.block" : "snappy",
     "storage.global.cleanup.timeout" : 600,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
index 49251a9817..f7e2885fb2 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
@@ -54,7 +54,10 @@
     "replication\.log\.buffer\.pagesize" : 131072,
     "replication\.strategy" : "none",
     "replication\.timeout" : 120,
+    "ssl\.cluster\.verify\.peer\.identity" : true,
     "ssl\.enabled" : false,
+    "ssl\.rmi\.verify\.peer\.identity" : true,
+    "ssl\.verify\.peer\.identity" : true,
     "storage.buffercache.pagesize" : 32768,
     "storage.compression.block" : "snappy",
     "storage.global.cleanup.timeout" : 600,
diff --git a/asterixdb/asterix-app/src/test/resources/security/cc/cc.crt b/asterixdb/asterix-app/src/test/resources/security/cc/cc.crt
index 94740b1542..3016d85818 100644
--- a/asterixdb/asterix-app/src/test/resources/security/cc/cc.crt
+++ b/asterixdb/asterix-app/src/test/resources/security/cc/cc.crt
@@ -1,23 +1,25 @@
 -----BEGIN CERTIFICATE-----
-MIIDvzCCAacCCQDz/BMGga4kNTANBgkqhkiG9w0BAQsFADApMQswCQYDVQQGEwJY
-WDEaMBgGA1UEAwwRQXN0ZXJpeERCIFRlc3QgQ0EwHhcNMTgxMTIxMTMyNjM2WhcN
-MjgxMTE4MTMyNjM2WjAaMQswCQYDVQQGEwJYWDELMAkGA1UEAwwCQ0MwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCv74U89DyyS2Zp1hmYDcCTf1+PQF7r
-QBd4+JjfCcSAAZfsZIhTqn0cVMCselqG/6+Z3CdBDGdunBLpkD1AqnYBD2JKT+vO
-13T9MRsArr/ItLwU9K5NaXBAYtspDF7sYvFQH7VgRKzp9Dk9D7/+VzJqBnsuU62h
-oqJ8nkYCdfuSMYhuT+UbANAzY4DF9sBwKmKXenodORQH9hO9iaJRefPLzmd+zI0/
-rxefgFkozEn68zBE36ez0+f2PBPiOsi9kLsK7pqd5scfIB5WIXHp4zDR3eafOe7v
-fvDWCPcAgOp7OXT2ehyUYsjMb2UCpdhf1eB410wmxRPdxBzele0ge7QhAgMBAAEw
-DQYJKoZIhvcNAQELBQADggIBALco+j2eAufgFMR0mUhOMTfdVKvA0p1YHqWM+O4V
-EWox4EHpLHp1/ae1ZQ2/M/b5MQQmZjhFp48sBVFMaQXgYzcPsPj+YfIqpe6H0KbA
-6seqztJ0dMFJY7iQtNKOMrhs04ykL4xogBzY4Dnj5rQxLuC8weDyAJGQCjvLDGDP
-GbgHdthuQB5IXNsdsUPha0CyBrqzVrTmi3fQ0SH4gSbJFK944Gtxhfi4IVxh+bR0
-MvvUoc5bgPjFn1QfGDHqXey1pon+Rt7rN2NlegmmafvfFfitxBeF0AzEzg0wGDuG
-zaEYs9Qc9emHdGYqZ9aJxcNTylbDvf6QSV5+AOZdntvPoXK3/lMBxgnG9ez9kE9t
-UoytM7TyXj6f5djhixhObc4P2grnxfigUDBKqqttTaMqQP1V/Rx4mjlqoePWQqlI
-Lv+/JZd7CId8J2QEtmaErsHPzpUdXGwClBrrqBnjH3sggP1IDWm0Q3E957vPDNK+
-6xqcFOIBv4GwqTikFkMmf0qACRS6+OaWNKS7lt55a0QL/g8gWlYRJIMtYxm2J562
-6ijC7L9sF705UjIjCnScxyE9h8QS/yl/AFF+iNhE/32AeAYDjyyqRgPZh2BQNGNk
-q/HruzEWmMphHjP8eypiePQeTWUPHpV4caHWoG7/Qy85+hpEccP2bh4QiT1YiKkR
-TeK/
+MIIELTCCAhWgAwIBAgIJAOor3RjfqKKvMA0GCSqGSIb3DQEBCwUAMCkxCzAJBgNV
+BAYTAlhYMRowGAYDVQQDDBFBc3Rlcml4REIgVGVzdCBDQTAeFw0yNjA5MTYwMDIy
+MDFaFw0zNjA5MTMwMDIyMDFaMBoxCzAJBgNVBAYTAlhYMQswCQYDVQQDDAJDQzCC
+ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK/vhTz0PLJLZmnWGZgNwJN/
+X49AXutAF3j4mN8JxIABl+xkiFOqfRxUwKx6Wob/r5ncJ0EMZ26cEumQPUCqdgEP
+YkpP687XdP0xGwCuv8i0vBT0rk1pcEBi2ykMXuxi8VAftWBErOn0OT0Pv/5XMmoG
+ey5TraGionyeRgJ1+5IxiG5P5RsA0DNjgMX2wHAqYpd6eh05FAf2E72JolF588vO
+Z37MjT+vF5+AWSjMSfrzMETfp7PT5/Y8E+I6yL2Quwrump3mxx8gHlYhcenjMNHd
+5p857u9+8NYI9wCA6ns5dPZ6HJRiyMxvZQKl2F/V4HjXTCbFE93EHN6V7SB7tCEC
+AwEAAaNnMGUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBaAwHQYDVR0lBBYwFAYIKwYB
+BQUHAwEGCCsGAQUFBwMCMCwGA1UdEQQlMCOCCWxvY2FsaG9zdIcEfwAAAYcQAAAA
+AAAAAAAAAAAAAAAAATANBgkqhkiG9w0BAQsFAAOCAgEAjqKFK6HPKqIsGY+ujqcJ
+EjBT3joXJZscfug8VOSShVrouxPvjNG+YEPVVgnXH1s6WD0XeP2QxDLwPvvFftVH
+xYeA3LPB93lvDZ3aCV9c+Vgpu8+iX+JDQ6e0rJ+B73ux3kEl58InCO/iO1gG77K5
+XjEUi77wXdcJ1cyOLF2KWiGaCyNkLKaqj43hzPIWaOLU18eIePhX3nyQl3pEOBYw
+D0wW6dq+5Wq9TdepTj3Karlc1zuS+OusB8TP5UmqmUmZdadChn5AC8DjX0UMppV5
+cALtslb4BU0cWXN0fvEX0gkfZVV7DzWRSWCeTbuBZXkI5DZeSxNVCsfa4grtD/dl
+SbhhhZ9GYOdPig+u24EGPAAYvQUDO9JP81lCH7rS7vc3ZJqIZ4o0pdcclGT6Ml5c
+tPxMcO5AM++C1qGZeB9qP3aeSPzMZzLPfCxuvDzJAAr1D8seOU9dmJ94hdC8lr+J
+FLoiA7ifyc08mVfyg7Ob/E5O6claSiH/pf7c4H8X1LFDjHteO8zbZQbF2dukbt+C
+AQQ22PLFXqG8yXAFSTbBZZBwMWvCjdnlqtbjlmzkVhA/WYJSjMWHk4GG5aDWhYc6
+zKuARQn1sSjf4k+Tz/kUvOJhJ/VFS75hVvB+vlHTiHck76QbZemeqp2UX+8hWzX4
+CYtGXLjjZjsQD7IPorjhW1o=
 -----END CERTIFICATE-----
diff --git a/asterixdb/asterix-app/src/test/resources/security/cc/cc.jks b/asterixdb/asterix-app/src/test/resources/security/cc/cc.jks
index 7aca1874ff..6bcbdc5e98 100644
Binary files a/asterixdb/asterix-app/src/test/resources/security/cc/cc.jks and b/asterixdb/asterix-app/src/test/resources/security/cc/cc.jks differ
diff --git a/asterixdb/asterix-app/src/test/resources/security/cc/cc.p12 b/asterixdb/asterix-app/src/test/resources/security/cc/cc.p12
index 751bb8e1aa..656d2b9070 100644
Binary files a/asterixdb/asterix-app/src/test/resources/security/cc/cc.p12 and b/asterixdb/asterix-app/src/test/resources/security/cc/cc.p12 differ
diff --git a/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.crt b/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.crt
index 8fbff0ab92..b87128654d 100644
--- a/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.crt
+++ b/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.crt
@@ -1,23 +1,25 @@
 -----BEGIN CERTIFICATE-----
-MIIDyjCCAbICCQDz/BMGga4kNjANBgkqhkiG9w0BAQsFADApMQswCQYDVQQGEwJY
-WDEaMBgGA1UEAwwRQXN0ZXJpeERCIFRlc3QgQ0EwHhcNMTgxMTIxMTMyODIwWhcN
-MjgxMTE4MTMyODIwWjAlMQswCQYDVQQGEwJYWDEWMBQGA1UEAwwNYXN0ZXJpeGRi
-X25jMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALM0qmtXFlDUcwly
-VT3MjWy1SokSxxjqPK2Y/zWmeupzCXZbP53N3kryAcO5sB/+aMgaYnKWCYNl6dlC
-GwQSzzwkI7hesyHlU7EiUeG920w9XJ7EdVnE/+kwtRevN6UOondzz0NlusLaHeJE
-Vj7kD7pP4LHRMUhSN2vANWQBjzs+wGcEn5li+i8goCI96KFH7j7M1GoDmFHIC0IQ
-9v9QHYQ/rUu2kbeqlyAIY7ZWURGIQgL5IiKLAa4TVHiSdDj911kZMiAgpQouotSs
-5zPMjj0KuusoC0zsCLaj8yJKZ8gscKTW0Ny48CQoR1j15FVwl7PNh2uLLNdc/ZVv
-DSUJgjMCAwEAATANBgkqhkiG9w0BAQsFAAOCAgEAozI3Up3/8oBVlKsxOWG5b98l
-isVcjO2rvwWZNy3ZI8bGma2TymBAeMQMxemXWUaWkeajJt0MzWD7tDaDZJyz1kbV
-E3dNDEdPT1I+xReQNadRiTdN3qyN49PG4eexBoYaYzvlrxmYZH632QwVOwYiyjRM
-qbzZP5k4fOLEwkPrR38ghJOFuI49QxVbC4+QJ7EgjuC78ZmB39QuKZIXiYMGojRl
-ItF95Y/dNTZYzXZnJTbeGylycyO4mkd9b6bRtsN79toate4tzUpm15l5B3ZkD0dX
-Lc4sKPBGAGqwrHojC6ipyyJpJIQfP/VoWUs+FdezA45+AHMkXZqiPhYBOqA66y1X
-z8NJDi87rcefDTwfFvqyyuodlOBPrFcNSowE/VZw51HpyAxkmYeObrJVk087Iz8i
-UrKMgrQ+w0hyA7IW6ma7ezC8607MMMTOB+FngX5CDcOjzAGPLpi/bgAho7CenmFG
-GYKKyWYW4FTnsiNH7Fi/WYKliKEBTmDBVt8crFHwDamLfMyEKvQExoCCgAu+MSs1
-+Yd0JFQ0OOELMjyo2UYt7A6exYSZ57TnqmGRM2QMwRtvwafOzqPL2xwtUZxdgphu
-XxijoZo5eA/DIENSLA0l2B+WaBh+MkdySuxqi2CBAxgldTQyUgsiyu7ctsYIMdMa
-nVIrPLaI1domgvyoXSA=
+MIIEODCCAiCgAwIBAgIJAOor3RjfqKKwMA0GCSqGSIb3DQEBCwUAMCkxCzAJBgNV
+BAYTAlhYMRowGAYDVQQDDBFBc3Rlcml4REIgVGVzdCBDQTAeFw0yNjA5MTYwMDIy
+MDFaFw0zNjA5MTMwMDIyMDFaMCUxCzAJBgNVBAYTAlhYMRYwFAYDVQQDDA1hc3Rl
+cml4ZGJfbmMxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAszSqa1cW
+UNRzCXJVPcyNbLVKiRLHGOo8rZj/NaZ66nMJdls/nc3eSvIBw7mwH/5oyBpicpYJ
+g2Xp2UIbBBLPPCQjuF6zIeVTsSJR4b3bTD1cnsR1WcT/6TC1F683pQ6id3PPQ2W6
+wtod4kRWPuQPuk/gsdExSFI3a8A1ZAGPOz7AZwSfmWL6LyCgIj3ooUfuPszUagOY
+UcgLQhD2/1AdhD+tS7aRt6qXIAhjtlZREYhCAvkiIosBrhNUeJJ0OP3XWRkyICCl
+Ci6i1KznM8yOPQq66ygLTOwItqPzIkpnyCxwpNbQ3LjwJChHWPXkVXCXs82Ha4ss
+11z9lW8NJQmCMwIDAQABo2cwZTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIFoDAdBgNV
+HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwLAYDVR0RBCUwI4IJbG9jYWxob3N0
+hwR/AAABhxAAAAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4ICAQAUWJ6w
+pnPGT0wxhU0U8jbw7kJhPV+nCdC7irqz3vYE2jbTlwilxhMHsuUt8xr4G25DTkhR
+u52ZyFVCyQBVGujXsjTVLPo99fiHRssrjRBJLTPRRibg9+Q/qUgMBlelUvPBeF7h
+3/oDJjrN9s6LPHQeTceSqRB3fuRBg0e35rNrDxEv+uhmPNMEPEonmJ8Js63ignyQ
+SJT/PtUBUfFCdg/IrOWH3xC/nr4AW7p5wgCR+bLSNBObMqcuYIPoL1R9zLfZ/AFK
+NmgItmlrsMA99+OY7XkJF/oLQTBEDG+cwfQe6eNwtoTJo7pgZO4wkhi8oLqb1zEo
+/NkrH6F0j3dkiEgX+cIY+sOngdCQ8jkUf3H53ZqobvAYujyK+Npc4mb2JNRNMZRr
+PPufslGqcxuRmAfgPQ9QjaYvgcr8kQbh6gyho3OVp4XNuuA9up7JSlIdUz8/nrdR
+OXvV4NADXakmQ608tVxS6iILPtzUkLpfgqtEbkRmk/a/s71G+4DGD8pHH8gCPxxo
+lTzTntmDNt6GT+XGg8LL4q/1MF0Vr0X6htyQWbsBomk8id3o8f/qHGUrEGiGgDSh
+XD+MCouti9QQ3bkI+qLR2YqHCl2GVk0LBz86yEWWJUlrfcMujhxSH8vUjV//jpND
+0p7PM8HH8O92fLHolbWHViGeKmCEjnGBmzZs8A==
 -----END CERTIFICATE-----
diff --git a/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.jks b/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.jks
index ecbde7e788..a186509b9a 100644
Binary files a/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.jks and b/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.jks differ
diff --git a/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.p12 b/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.p12
index 0736eae82b..62553941b8 100644
Binary files a/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.p12 and b/asterixdb/asterix-app/src/test/resources/security/nc1/asterix_nc1.p12 differ
diff --git a/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.crt b/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.crt
index 486d2a082f..c0eda8546e 100644
--- a/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.crt
+++ b/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.crt
@@ -1,23 +1,25 @@
 -----BEGIN CERTIFICATE-----
-MIIDyjCCAbICCQDz/BMGga4kNzANBgkqhkiG9w0BAQsFADApMQswCQYDVQQGEwJY
-WDEaMBgGA1UEAwwRQXN0ZXJpeERCIFRlc3QgQ0EwHhcNMTgxMTIxMTMyODQ4WhcN
-MjgxMTE4MTMyODQ4WjAlMQswCQYDVQQGEwJYWDEWMBQGA1UEAwwNYXN0ZXJpeGRi
-X25jMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVL+K/tP23E6Lk6
-uZH38yzKSEdAxDgnxAMVqTiqgEz8lz1YvFsY43rlBLu0+NSbNTRlUXhoxfFRVKN5
-e/iLVPFWL9VViLZP2FvTY0z6pkdwjKHtLA1uCMtUyIZwjB9yv7k0uVmvqm/zmFpm
-riL4TZA3/cNGZZw6MewkT0LeqI5vHUWfsNmDqYRyDucFOUVNunneZ6TZPMaspqOg
-XpwdN4UkbC2TUnWjMxC/XB+ZhkOAIYNYIvXzsL15tRV/3Rba5lJZHg7KaxM3rPo3
-8mmtA/y4rtlqouYf8X2nSbol3+WX3/U7xXtc2YuB5WUlXtUyixO8E8jVadpTUot4
-fU7CNOsCAwEAATANBgkqhkiG9w0BAQsFAAOCAgEAcIbcRE813t3Deku4K1867YBG
-sQ+sSshLy2VRWIykI7S9KRQwP2VuixvuUw/U7Ey39fDzj1howMhulFq8jXOQKp1z
-Fk2dmA5cDlAxEyD42k8QgvM8G9Kz6dmv4eV3cnUqv6f1VA3wV/598y3hhPuLHCXx
-vAaoGBCgdokDAARbirBU4UBjBO/Frjo63L6CoR3Avy3Cm+Hk556cTQlfWTMOKuOR
-wUINusnLc2x5q0tN7CSkZKzjyfotTSle2cfupnTLlVKC3/ln1Thga6gCkht39FtE
-XVWj1A2qNQlud5RTkmTLkedLhkRXvMSdD/V2pxo5gFaYTNRBHEGUhpXyOSnImLoh
-Uc7LFfalHC2cvhqNJNd4VPA7PNjNO6dvd/oNVclIFlrtiEMbTXnsLR8Tl7DU/L1/
-uxnYsdJomMTyFpCxMTaqDuYmsRKwcqaR0LQKvEmIWAzomjg+o5vpnhsThwpLBemA
-cboOFXV7mZiV4wLXzTUMnYHlb8syoNtliVbG+fkePVzZRkjD5wHW6OQbIJwE8/lB
-oY/XRsga9NT0O6KVfaLLJjeDRNLXBh+d7SjVPERIiut1/WnRVADSn/5g45YTWifM
-7UTw68DtCUA9HdXuNZ3d1B2zyPncNd2utJA6PIqVVDPGi0F0w4h1blSY/x5aOTjo
-VZ5xVqVAqZ2+K5Ljjvs=
+MIIEODCCAiCgAwIBAgIJAOor3RjfqKKxMA0GCSqGSIb3DQEBCwUAMCkxCzAJBgNV
+BAYTAlhYMRowGAYDVQQDDBFBc3Rlcml4REIgVGVzdCBDQTAeFw0yNjA5MTYwMDIy
+MDFaFw0zNjA5MTMwMDIyMDFaMCUxCzAJBgNVBAYTAlhYMRYwFAYDVQQDDA1hc3Rl
+cml4ZGJfbmMyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxUv4r+0/
+bcTouTq5kffzLMpIR0DEOCfEAxWpOKqATPyXPVi8WxjjeuUEu7T41Js1NGVReGjF
+8VFUo3l7+ItU8VYv1VWItk/YW9NjTPqmR3CMoe0sDW4Iy1TIhnCMH3K/uTS5Wa+q
+b/OYWmauIvhNkDf9w0ZlnDox7CRPQt6ojm8dRZ+w2YOphHIO5wU5RU26ed5npNk8
+xqymo6BenB03hSRsLZNSdaMzEL9cH5mGQ4Ahg1gi9fOwvXm1FX/dFtrmUlkeDspr
+Ezes+jfyaa0D/Liu2Wqi5h/xfadJuiXf5Zff9TvFe1zZi4HlZSVe1TKLE7wTyNVp
+2lNSi3h9TsI06wIDAQABo2cwZTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIFoDAdBgNV
+HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwLAYDVR0RBCUwI4IJbG9jYWxob3N0
+hwR/AAABhxAAAAAAAAAAAAAAAAAAAAABMA0GCSqGSIb3DQEBCwUAA4ICAQAaQO7L
+ZobeU6wsvLlTwIgyOpUB5uoPEQn6tH/gi2gG5tFe2DahFV9Nl5DEfbjEpMmo9aVP
+DSe1WKGTqQcnM9rXltkbas+Hs7lNNW2DcIHA+nnN/gsjOjvaQdZtMgDAmQfTNb5J
+ObCikrz5DGEkQrMv1oEd+OkJIZeZ8YLY5IsddUIuUtDyvqu0IWeJ00COCSMlfUJf
+wP6A2Uu6EITCe2tLALQcHj80s3Lv2Ut2NzGFFt0gd/Xcjoy1lf1NV50GdagTlxM7
+HI/vE1wEDKJa3d2EQ1La84bMeFxYIOMWh9GXZvTEGMoLFrROw4TAl7wBhqfL88EQ
+m+ryR2LZS44jdzsLxHXgjwuITISMAiBB6Z/p9ozAYj4VbxrI4IJcD6++9gdW9KSv
+oQJtU+UxQOghVYeZQQTF25H2C/Wz287M34/OgGQwxCcTjlf0aplDwipNECwqo/+0
+KHPXlYbZ4yaIav/jWI4PNlsfIEyeicefBNTUslo1r7qpSQmMZvnT8oPmLiGOgQM4
+NtXSWy/ucrnPzIbYBhc6H3uIyBkeJllfmIZyiOz2VppiZXFX+X7HN8/TiqAKYyM9
+GRCIJFNvAac0wwmBt5Zt10rNIkccflsvmTSfmZsoen6BTe3radcy+ejNMeErd/1j
+aFcTVmk3iK67yIGR8YizSp6YVir3lpaX2oeELg==
 -----END CERTIFICATE-----
diff --git a/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.jks b/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.jks
index df4f83f256..d5c43781e5 100644
Binary files a/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.jks and b/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.jks differ
diff --git a/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.p12 b/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.p12
index 4839db9f46..61fbcb4a75 100644
Binary files a/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.p12 and b/asterixdb/asterix-app/src/test/resources/security/nc2/asterix_nc2.p12 differ
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/RMIClientFactory.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/RMIClientFactory.java
index ce459e27f7..55c393c276 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/RMIClientFactory.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/RMIClientFactory.java
@@ -26,6 +26,8 @@ import java.net.Socket;
 import java.rmi.server.RMIClientSocketFactory;
 
 import javax.net.SocketFactory;
+import javax.net.ssl.SSLParameters;
+import javax.net.ssl.SSLSocket;
 import javax.net.ssl.SSLSocketFactory;
 
 import org.apache.hyracks.api.network.INetworkSecurityConfig;
@@ -66,30 +68,48 @@ public class RMIClientFactory implements RMIClientSocketFactory, Serializable {
     private static class RMITrustedClientSSLSocketFactory extends SSLSocketFactory {
 
         protected SSLSocketFactory factory;
+        private final boolean verifyPeerIdentity;
 
         public RMITrustedClientSSLSocketFactory(INetworkSecurityConfig config) {
             this.factory = NetworkSecurityManager.newSSLContext(config).getSocketFactory();
+            this.verifyPeerIdentity = config.verifyRmiPeerIdentity();
         }
 
         public Socket createSocket(InetAddress host, int port) throws IOException {
-            return this.factory.createSocket(host, port);
+            return identifyPeer(this.factory.createSocket(host, port));
         }
 
         public Socket createSocket(String host, int port) throws IOException {
-            return this.factory.createSocket(host, port);
+            return identifyPeer(this.factory.createSocket(host, port));
         }
 
         public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException {
-            return this.factory.createSocket(host, port, localHost, localPort);
+            return identifyPeer(this.factory.createSocket(host, port, localHost, localPort));
         }
 
         public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
                 throws IOException {
-            return this.factory.createSocket(address, port, localAddress, localPort);
+            return identifyPeer(this.factory.createSocket(address, port, localAddress, localPort));
         }
 
         public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException {
-            return this.factory.createSocket(socket, host, port, autoClose);
+            return identifyPeer(this.factory.createSocket(socket, host, port, autoClose));
+        }
+
+        /**
+         * Requires the certificate the peer presents to identify the host this socket was opened to. An
+         * {@link SSLSocket} performs no such check unless it is asked to, leaving any holder of a certificate the
+         * trust store chains to able to answer in place of the metadata node.
+         */
+        private Socket identifyPeer(Socket socket) {
+            if (!verifyPeerIdentity) {
+                return socket;
+            }
+            SSLSocket sslSocket = (SSLSocket) socket;
+            SSLParameters sslParameters = sslSocket.getSSLParameters();
+            sslParameters.setEndpointIdentificationAlgorithm(NetworkSecurityManager.ENDPOINT_IDENTIFICATION_ALGORITHM);
+            sslSocket.setSSLParameters(sslParameters);
+            return sslSocket;
         }
 
         public String[] getDefaultCipherSuites() {
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityConfig.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityConfig.java
index 7fc0335c5c..d71f188a5b 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityConfig.java
@@ -33,6 +33,28 @@ public interface INetworkSecurityConfig extends Serializable {
      */
     boolean isSslEnabled();
 
+    /**
+     * Indicates if the certificate a peer presents on a secured cluster connection must identify the address that
+     * peer was reached at. When this is false the peer's chain is still validated against the trust store, but any
+     * host holding a certificate it validates is accepted in place of the node that was dialled.
+     *
+     * @return true if the peer's identity should be verified. Otherwise false.
+     */
+    default boolean verifyPeerIdentity() {
+        return true;
+    }
+
+    /**
+     * As {@link #verifyPeerIdentity()}, for RMI connections. These are separate because RMI reaches a node by the
+     * host recorded in the exported stub ({@code java.rmi.server.hostname}), which is configured independently of
+     * the address the cluster's own connections use and so may be covered by a different name, or none.
+     *
+     * @return true if the peer's identity should be verified on RMI connections. Otherwise false.
+     */
+    default boolean verifyRmiPeerIdentity() {
+        return true;
+    }
+
     /**
      * Gets the key store to be used for secured connections
      *
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityManager.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityManager.java
index eb52436d4e..90bd171c30 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/network/INetworkSecurityManager.java
@@ -18,6 +18,8 @@
  */
 package org.apache.hyracks.api.network;
 
+import java.net.InetSocketAddress;
+
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
 
@@ -31,11 +33,23 @@ public interface INetworkSecurityManager {
     SSLContext newSSLContext();
 
     /**
-     * Creates a new ssl engine based on the current configuration of this {@link INetworkSecurityManager}
+     * Creates a new server-mode ssl engine based on the current configuration of this
+     * {@link INetworkSecurityManager}
+     *
+     * @return a new ssl engine
+     */
+    SSLEngine newServerSSLEngine();
+
+    /**
+     * Creates a new client-mode ssl engine based on the current configuration of this
+     * {@link INetworkSecurityManager}. The engine verifies that the certificate the peer presents identifies
+     * {@code peer}; validating the chain against the trust store on its own leaves any holder of a trusted
+     * certificate able to answer in place of the node that was dialled.
      *
+     * @param peer the address this connection was made to
      * @return a new ssl engine
      */
-    SSLEngine newSSLEngine();
+    SSLEngine newClientSSLEngine(InetSocketAddress peer);
 
     /**
      * Sets the configuration to be used for this {@link INetworkSecurityManager}
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
index 1dd54ad130..47bdc1caaf 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerService.java
@@ -571,7 +571,8 @@ public class ClusterControllerService implements IControllerService {
 
     protected INetworkSecurityManager createNetworkSecurityManager(IApplicationConfig appConfig, IApplication app)
             throws Exception {
-        return new NetworkSecurityManager(NetworkSecurityConfig.of(ccConfig.isSslEnabled(), ccConfig.getKeyStorePath(),
-                ccConfig.getKeyStorePassword(), ccConfig.getTrustStorePath()));
+        return new NetworkSecurityManager(NetworkSecurityConfig.of(ccConfig.isSslEnabled(),
+                ccConfig.isSslClusterVerifyPeerIdentity(), ccConfig.isSslRmiVerifyPeerIdentity(),
+                ccConfig.getKeyStorePath(), ccConfig.getKeyStorePassword(), ccConfig.getTrustStorePath()));
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java
index 19eba57d88..16d938a595 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/controllers/ControllerConfig.java
@@ -50,7 +50,24 @@ public class ControllerConfig implements Serializable {
                 (Function<IApplicationConfig, String>) appConfig -> FileUtil
                         .joinPath(appConfig.getString(ControllerConfig.Option.DEFAULT_DIR), "logs"),
                 "The directory where logs for this node are written"),
-        SSL_ENABLED(BOOLEAN, false, "A flag indicating if cluster communications should use secured connections");
+        SSL_ENABLED(BOOLEAN, false, "A flag indicating if cluster communications should use secured connections"),
+        SSL_VERIFY_PEER_IDENTITY(
+                BOOLEAN,
+                true,
+                "A flag indicating if the certificate a peer presents on a secured connection must identify the"
+                        + " address it was reached at. Disabling this accepts any certificate the trust store"
+                        + " validates, whichever host presents it. This is the default for each of the connections"
+                        + " below, which may also be set on their own"),
+        SSL_CLUSTER_VERIFY_PEER_IDENTITY(
+                BOOLEAN,
+                SSL_VERIFY_PEER_IDENTITY,
+                "A flag indicating if the certificate a peer presents on a secured cluster connection must identify"
+                        + " the address that peer was reached at"),
+        SSL_RMI_VERIFY_PEER_IDENTITY(
+                BOOLEAN,
+                SSL_VERIFY_PEER_IDENTITY,
+                "A flag indicating if the certificate presented on a secured RMI connection must identify the"
+                        + " address it was reached at");
 
         private final IOptionType type;
         private final String description;
@@ -68,6 +85,12 @@ public class ControllerConfig implements Serializable {
             this.description = description;
         }
 
+        <T> Option(IOptionType<T> type, Option defaultOption, String description) {
+            this.type = type;
+            this.defaultValue = defaultOption;
+            this.description = description;
+        }
+
         @Override
         public Section section() {
             return Section.COMMON;
@@ -133,4 +156,15 @@ public class ControllerConfig implements Serializable {
         return getAppConfig().getBoolean(Option.SSL_ENABLED);
     }
 
+    public boolean isSslVerifyPeerIdentity() {
+        return getAppConfig().getBoolean(Option.SSL_VERIFY_PEER_IDENTITY);
+    }
+
+    public boolean isSslClusterVerifyPeerIdentity() {
+        return getAppConfig().getBoolean(Option.SSL_CLUSTER_VERIFY_PEER_IDENTITY);
+    }
+
+    public boolean isSslRmiVerifyPeerIdentity() {
+        return getAppConfig().getBoolean(Option.SSL_RMI_VERIFY_PEER_IDENTITY);
+    }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
index 90d4255b1a..59b2800f93 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/NodeControllerService.java
@@ -729,7 +729,8 @@ public class NodeControllerService implements IControllerService {
 
     protected INetworkSecurityManager createNetworkSecurityManager(IApplicationConfig appConfig,
             INCApplication application) {
-        return new NetworkSecurityManager(NetworkSecurityConfig.of(ncConfig.isSslEnabled(), ncConfig.getKeyStorePath(),
-                ncConfig.getKeyStorePassword(), ncConfig.getTrustStorePath()));
+        return new NetworkSecurityManager(NetworkSecurityConfig.of(ncConfig.isSslEnabled(),
+                ncConfig.isSslClusterVerifyPeerIdentity(), ncConfig.isSslRmiVerifyPeerIdentity(),
+                ncConfig.getKeyStorePath(), ncConfig.getKeyStorePassword(), ncConfig.getTrustStorePath()));
     }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml b/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
index 35ebde2aed..00fd85f7b5 100644
--- a/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/pom.xml
@@ -82,5 +82,17 @@
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.bouncycastle</groupId>
+      <artifactId>bcpkix-jdk18on</artifactId>
+      <version>1.85</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.bouncycastle</groupId>
+      <artifactId>bcprov-jdk18on</artifactId>
+      <version>1.85.2</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityConfig.java b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityConfig.java
index bfcd623900..ca9627103b 100644
--- a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityConfig.java
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityConfig.java
@@ -36,15 +36,20 @@ public class NetworkSecurityConfig implements INetworkSecurityConfig {
     private static final long serialVersionUID = 2L;
     private static final char[] INTEGRITY_PASSWORD = NetworkSecurityConfig.class.getName().toCharArray();
     private final boolean sslEnabled;
+    private final boolean verifyPeerIdentity;
+    private final boolean verifyRmiPeerIdentity;
     private final File keyStoreFile;
     private final File trustStoreFile;
     private final String keyStorePassword;
     private transient KeyStore keyStore;
     private transient KeyStore trustStore;
 
-    private NetworkSecurityConfig(boolean sslEnabled, String keyStoreFile, String keyStorePassword,
-            String trustStoreFile, KeyStore keyStore, KeyStore trustStore) {
+    private NetworkSecurityConfig(boolean sslEnabled, boolean verifyPeerIdentity, boolean verifyRmiPeerIdentity,
+            String keyStoreFile, String keyStorePassword, String trustStoreFile, KeyStore keyStore,
+            KeyStore trustStore) {
         this.sslEnabled = sslEnabled;
+        this.verifyPeerIdentity = verifyPeerIdentity;
+        this.verifyRmiPeerIdentity = verifyRmiPeerIdentity;
         this.keyStoreFile = keyStoreFile != null ? new File(keyStoreFile) : null;
         this.keyStorePassword = keyStorePassword;
         this.trustStoreFile = trustStoreFile != null ? new File(trustStoreFile) : null;
@@ -54,12 +59,24 @@ public class NetworkSecurityConfig implements INetworkSecurityConfig {
 
     public static NetworkSecurityConfig of(boolean sslEnabled, String keyStoreFile, String keyStorePassword,
             String trustStoreFile) {
-        return new NetworkSecurityConfig(sslEnabled, keyStoreFile, keyStorePassword, trustStoreFile, null, null);
+        return of(sslEnabled, true, true, keyStoreFile, keyStorePassword, trustStoreFile);
+    }
+
+    public static NetworkSecurityConfig of(boolean sslEnabled, boolean verifyPeerIdentity,
+            boolean verifyRmiPeerIdentity, String keyStoreFile, String keyStorePassword, String trustStoreFile) {
+        return new NetworkSecurityConfig(sslEnabled, verifyPeerIdentity, verifyRmiPeerIdentity, keyStoreFile,
+                keyStorePassword, trustStoreFile, null, null);
     }
 
     public static NetworkSecurityConfig of(boolean sslEnabled, KeyStore keyStore, String keyStorePassword,
             KeyStore trustStore) {
-        return new NetworkSecurityConfig(sslEnabled, null, keyStorePassword, null, keyStore, trustStore);
+        return of(sslEnabled, true, true, keyStore, keyStorePassword, trustStore);
+    }
+
+    public static NetworkSecurityConfig of(boolean sslEnabled, boolean verifyPeerIdentity,
+            boolean verifyRmiPeerIdentity, KeyStore keyStore, String keyStorePassword, KeyStore trustStore) {
+        return new NetworkSecurityConfig(sslEnabled, verifyPeerIdentity, verifyRmiPeerIdentity, null, keyStorePassword,
+                null, keyStore, trustStore);
     }
 
     @Override
@@ -67,6 +84,16 @@ public class NetworkSecurityConfig implements INetworkSecurityConfig {
         return sslEnabled;
     }
 
+    @Override
+    public boolean verifyPeerIdentity() {
+        return verifyPeerIdentity;
+    }
+
+    @Override
+    public boolean verifyRmiPeerIdentity() {
+        return verifyRmiPeerIdentity;
+    }
+
     @Override
     public File getKeyStoreFile() {
         return keyStoreFile;
diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityManager.java b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityManager.java
index db524ca3d5..f6a35c4ce4 100644
--- a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/security/NetworkSecurityManager.java
@@ -19,12 +19,14 @@
 package org.apache.hyracks.ipc.security;
 
 import java.io.FileInputStream;
+import java.net.InetSocketAddress;
 import java.security.KeyStore;
 import java.security.SecureRandom;
 
 import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLParameters;
 import javax.net.ssl.TrustManagerFactory;
 
 import org.apache.hyracks.api.network.INetworkSecurityConfig;
@@ -38,6 +40,7 @@ public class NetworkSecurityManager implements INetworkSecurityManager {
     private volatile INetworkSecurityConfig config;
     protected final ISocketChannelFactory sslSocketFactory;
     public static final String TSL_VERSION = "TLSv1.2";
+    public static final String ENDPOINT_IDENTIFICATION_ALGORITHM = "HTTPS";
 
     public NetworkSecurityManager(INetworkSecurityConfig config) {
         this.config = config;
@@ -50,10 +53,29 @@ public class NetworkSecurityManager implements INetworkSecurityManager {
     }
 
     @Override
-    public SSLEngine newSSLEngine() {
+    public SSLEngine newServerSSLEngine() {
         try {
-            SSLContext ctx = newSSLContext();
-            return ctx.createSSLEngine();
+            SSLEngine sslEngine = newSSLContext().createSSLEngine();
+            sslEngine.setUseClientMode(false);
+            return sslEngine;
+        } catch (Exception ex) {
+            throw new IllegalStateException("Failed to create SSLEngine", ex);
+        }
+    }
+
+    @Override
+    public SSLEngine newClientSSLEngine(InetSocketAddress peer) {
+        try {
+            // the peer host is the name matched against the certificate, so an engine created without it cannot
+            // identify anything- the handshake then fails outright rather than skipping the check
+            SSLEngine sslEngine = newSSLContext().createSSLEngine(peer.getHostString(), peer.getPort());
+            sslEngine.setUseClientMode(true);
+            if (config.verifyPeerIdentity()) {
+                SSLParameters sslParameters = sslEngine.getSSLParameters();
+                sslParameters.setEndpointIdentificationAlgorithm(ENDPOINT_IDENTIFICATION_ALGORITHM);
+                sslEngine.setSSLParameters(sslParameters);
+            }
+            return sslEngine;
         } catch (Exception ex) {
             throw new IllegalStateException("Failed to create SSLEngine", ex);
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/sockets/SslSocketChannelFactory.java b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/sockets/SslSocketChannelFactory.java
index 2a2fb62830..593d87bac4 100644
--- a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/sockets/SslSocketChannelFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/sockets/SslSocketChannelFactory.java
@@ -18,6 +18,10 @@
  */
 package org.apache.hyracks.ipc.sockets;
 
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
 import java.nio.channels.SocketChannel;
 
 import javax.net.ssl.SSLEngine;
@@ -36,15 +40,32 @@ public class SslSocketChannelFactory implements ISocketChannelFactory {
 
     @Override
     public ISocketChannel createServerChannel(SocketChannel socketChannel) {
-        final SSLEngine sslEngine = networkSecurityManager.newSSLEngine();
-        sslEngine.setUseClientMode(false);
+        final SSLEngine sslEngine = networkSecurityManager.newServerSSLEngine();
         return new SslSocketChannel(socketChannel, sslEngine);
     }
 
     @Override
     public ISocketChannel createClientChannel(SocketChannel socketChannel) {
-        final SSLEngine sslEngine = networkSecurityManager.newSSLEngine();
-        sslEngine.setUseClientMode(true);
+        final SSLEngine sslEngine = networkSecurityManager.newClientSSLEngine(peerOf(socketChannel));
         return new SslSocketChannel(socketChannel, sslEngine);
     }
+
+    /**
+     * The address the channel was connected to, which is the name the peer's certificate has to identify. This is
+     * the address passed to {@link SocketChannel#connect}, not a re-resolution of it, so a peer dialled by hostname
+     * is identified by that hostname.
+     */
+    private static InetSocketAddress peerOf(SocketChannel socketChannel) {
+        final SocketAddress remoteAddress;
+        try {
+            remoteAddress = socketChannel.getRemoteAddress();
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+        if (!(remoteAddress instanceof InetSocketAddress)) {
+            // null when the channel is not connected; a client channel is only created once it is
+            throw new IllegalStateException("cannot secure a client channel with remote address " + remoteAddress);
+        }
+        return (InetSocketAddress) remoteAddress;
+    }
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/src/test/java/org/apache/hyracks/ipc/tests/SslPeerIdentityTest.java b/hyracks-fullstack/hyracks/hyracks-ipc/src/test/java/org/apache/hyracks/ipc/tests/SslPeerIdentityTest.java
new file mode 100644
index 0000000000..e4c480f3be
--- /dev/null
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/test/java/org/apache/hyracks/ipc/tests/SslPeerIdentityTest.java
@@ -0,0 +1,238 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.hyracks.ipc.tests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.KeyStore;
+import java.security.PrivateKey;
+import java.security.cert.Certificate;
+import java.security.cert.X509Certificate;
+import java.time.Duration;
+import java.time.Instant;
+import java.util.Date;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import javax.net.ssl.SSLEngine;
+import javax.net.ssl.SSLException;
+import javax.security.auth.x500.X500Principal;
+
+import org.apache.hyracks.api.network.INetworkSecurityManager;
+import org.apache.hyracks.api.network.ISocketChannel;
+import org.apache.hyracks.ipc.security.NetworkSecurityConfig;
+import org.apache.hyracks.ipc.security.NetworkSecurityManager;
+import org.bouncycastle.asn1.x509.BasicConstraints;
+import org.bouncycastle.asn1.x509.Extension;
+import org.bouncycastle.asn1.x509.GeneralName;
+import org.bouncycastle.asn1.x509.GeneralNames;
+import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
+import org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder;
+import org.bouncycastle.operator.ContentSigner;
+import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Validating the peer's chain against the trust store says only that a holder of a trusted certificate answered, not
+ * that the node which was dialled did. These assert that a client channel also holds the peer to the identity its
+ * certificate was issued to, so a certificate the cluster CA issued to another node is refused (ASTERIXDB-3851).
+ */
+public class SslPeerIdentityTest {
+
+    private static final String DIALLED_HOST = "localhost";
+    private static final String OTHER_HOST = "hyracks-nc2.example.com";
+    private static final int UNUSED_PORT = 3099;
+    private static final String PASSWORD = SslPeerIdentityTest.class.getSimpleName();
+    private static final String SIGNATURE_ALGORITHM = "SHA256withRSA";
+
+    private static INetworkSecurityManager client;
+    private static INetworkSecurityManager unverifyingClient;
+    private static INetworkSecurityManager dialledHost;
+    private static INetworkSecurityManager otherHost;
+    private static ExecutorService executor;
+
+    @BeforeClass
+    public static void setUp() throws Exception {
+        final KeyPair caKeyPair = keyPair();
+        final X509Certificate ca = certificate(caKeyPair, "Hyracks Test CA", null, caKeyPair.getPrivate(), null);
+        // one CA, trusted by the client, which has issued a certificate to each of two nodes
+        final KeyStore trustStore = emptyStore();
+        trustStore.setCertificateEntry("ca", ca);
+        client = securityManager(emptyStore(), trustStore, true);
+        unverifyingClient = securityManager(emptyStore(), trustStore, false);
+        dialledHost = securityManager(identity(DIALLED_HOST, ca, caKeyPair.getPrivate()), trustStore, true);
+        otherHost = securityManager(identity(OTHER_HOST, ca, caKeyPair.getPrivate()), trustStore, true);
+        executor = Executors.newSingleThreadExecutor();
+    }
+
+    @AfterClass
+    public static void tearDown() {
+        executor.shutdownNow();
+    }
+
+    @Test
+    public void clientEngineIdentifiesThePeerItDialled() {
+        final SSLEngine engine =
+                client.newClientSSLEngine(InetSocketAddress.createUnresolved(DIALLED_HOST, UNUSED_PORT));
+        assertEquals(NetworkSecurityManager.ENDPOINT_IDENTIFICATION_ALGORITHM,
+                engine.getSSLParameters().getEndpointIdentificationAlgorithm());
+        // the algorithm on its own identifies nothing; the name it matches is the peer the engine was created for
+        assertEquals(DIALLED_HOST, engine.getPeerHost());
+        assertEquals(UNUSED_PORT, engine.getPeerPort());
+    }
+
+    /**
+     * A server is not the party doing the dialling, so it has no name to hold its peer to and must not ask for one.
+     */
+    @Test
+    public void serverEngineDoesNotIdentifyTheClient() {
+        assertNull(dialledHost.newServerSSLEngine().getSSLParameters().getEndpointIdentificationAlgorithm());
+    }
+
+    @Test
+    public void certificateIssuedToTheDialledHostIsAccepted() throws Exception {
+        assertTrue(handshake(client, dialledHost));
+    }
+
+    /**
+     * The escape hatch for a deployment whose certificates cannot name the addresses its nodes are reached at. The
+     * chain is still validated, so this is not the same as trusting anything.
+     */
+    @Test
+    public void identityIsNotVerifiedWhenTheOptionIsDisabled() throws Exception {
+        assertNull(unverifyingClient.newClientSSLEngine(InetSocketAddress.createUnresolved(DIALLED_HOST, UNUSED_PORT))
+                .getSSLParameters().getEndpointIdentificationAlgorithm());
+        assertTrue(handshake(unverifyingClient, otherHost));
+    }
+
+    @Test
+    public void certificateIssuedToAnotherHostIsRefused() throws Exception {
+        try {
+            handshake(client, otherHost);
+        } catch (IllegalStateException e) {
+            final SSLException sslFailure = sslCause(e);
+            assertTrue("expected an SSL failure, got " + e, sslFailure != null);
+            assertTrue(sslFailure.getMessage(), sslFailure.getMessage().contains(DIALLED_HOST));
+            return;
+        }
+        throw new AssertionError(
+                "handshake accepted a certificate issued to " + OTHER_HOST + " while dialling " + DIALLED_HOST);
+    }
+
+    /**
+     * Connects to a peer secured by {@code peer} over the loopback interface and completes the client's handshake.
+     * The name the peer's certificate is checked against is the one the socket was opened to, {@link #DIALLED_HOST}.
+     */
+    private boolean handshake(INetworkSecurityManager dialler, INetworkSecurityManager peer) throws Exception {
+        try (ServerSocketChannel listener = ServerSocketChannel.open()) {
+            listener.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0));
+            final int port = ((InetSocketAddress) listener.getLocalAddress()).getPort();
+            try (SocketChannel clientSocket = SocketChannel.open(new InetSocketAddress(DIALLED_HOST, port));
+                    SocketChannel peerSocket = listener.accept()) {
+                clientSocket.configureBlocking(false);
+                peerSocket.configureBlocking(false);
+                final ISocketChannel peerChannel = peer.getSocketChannelFactory().createServerChannel(peerSocket);
+                final ISocketChannel clientChannel =
+                        dialler.getSocketChannelFactory().createClientChannel(clientSocket);
+                // the peer's handshake fails alongside the client's whenever the client refuses its certificate; its
+                // outcome is not what is under test, but it has to be running for the client's to make progress
+                final Future<?> peerHandshake = executor.submit(() -> quietly(peerChannel));
+                try {
+                    return clientChannel.handshake();
+                } finally {
+                    peerHandshake.cancel(true);
+                }
+            }
+        }
+    }
+
+    private static void quietly(ISocketChannel channel) {
+        try {
+            channel.handshake();
+        } catch (Exception e) {
+            // expected whenever the client refuses the certificate
+        }
+    }
+
+    private static SSLException sslCause(Throwable t) {
+        for (Throwable cause = t; cause != null; cause = cause.getCause()) {
+            if (cause instanceof SSLException) {
+                return (SSLException) cause;
+            }
+        }
+        return null;
+    }
+
+    private static INetworkSecurityManager securityManager(KeyStore keyStore, KeyStore trustStore,
+            boolean verifyPeerIdentity) {
+        return new NetworkSecurityManager(
+                NetworkSecurityConfig.of(true, verifyPeerIdentity, verifyPeerIdentity, keyStore, PASSWORD, trustStore));
+    }
+
+    /** A key store holding a certificate issued to {@code host} by {@code ca}, with {@code host} as its only SAN. */
+    private static KeyStore identity(String host, X509Certificate ca, PrivateKey caKey) throws Exception {
+        final KeyPair keyPair = keyPair();
+        final X509Certificate certificate = certificate(keyPair, host, host, caKey, ca);
+        final KeyStore keyStore = emptyStore();
+        keyStore.setKeyEntry("identity", keyPair.getPrivate(), PASSWORD.toCharArray(),
+                new Certificate[] { certificate, ca });
+        return keyStore;
+    }
+
+    private static X509Certificate certificate(KeyPair keyPair, String commonName, String subjectAltName,
+            PrivateKey issuerKey, X509Certificate issuer) throws Exception {
+        final X500Principal subject = new X500Principal("CN=" + commonName);
+        final Instant now = Instant.now();
+        final JcaX509v3CertificateBuilder builder =
+                new JcaX509v3CertificateBuilder(issuer != null ? issuer.getSubjectX500Principal() : subject,
+                        BigInteger.valueOf(now.toEpochMilli()), Date.from(now.minus(Duration.ofDays(1))),
+                        Date.from(now.plus(Duration.ofDays(365))), subject, keyPair.getPublic());
+        builder.addExtension(Extension.basicConstraints, true, new BasicConstraints(issuer == null));
+        if (subjectAltName != null) {
+            builder.addExtension(Extension.subjectAlternativeName, false,
+                    new GeneralNames(new GeneralName(GeneralName.dNSName, subjectAltName)));
+        }
+        final ContentSigner signer = new JcaContentSignerBuilder(SIGNATURE_ALGORITHM).build(issuerKey);
+        return new JcaX509CertificateConverter().getCertificate(builder.build(signer));
+    }
+
+    private static KeyPair keyPair() throws Exception {
+        final KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
+        generator.initialize(2048);
+        return generator.generateKeyPair();
+    }
+
+    private static KeyStore emptyStore() throws Exception {
+        final KeyStore store = KeyStore.getInstance(KeyStore.getDefaultType());
+        store.load(null, null);
+        return store;
+    }
+}


(asterixdb) 09/13: [NO ISSUE][RT] Locate duplicate field errors and test the field named

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit ee47025379c36222e3e7749c8adcaee4973eadca
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Wed Oct 7 18:08:57 2026 -0400

    [NO ISSUE][RT] Locate duplicate field errors and test the field named
    
    - user model changes: no
    - storage format changes: no
    - interface changes: no
    
    Details: object_merge() and object_add_fields() raised
    DUPLICATE_FIELD_NAME without a source location, so the error did not say
    where in the statement the conflict arose, unlike the other duplicate
    field errors. Pass the function's source location.
    
    Add object_merge_duplicate_fields, which pins the field name and
    location for a top-level conflict, a conflict inside a nested object,
    and object_add_fields(), using multi-character names so a wrong offset
    would show; and checks that equal values for a shared field still merge.
    
    Ext-ref: MB-74440
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: I0cfd0d9173c969cefa6f9d4adc7b1c63261e1e34
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22015
    Tested-by: Michael Blow <mb...@apache.org>
    Reviewed-by: Murtadha Hubail <mh...@apache.org>
---
 .../queries_sqlpp/objects/ObjectsQueries.xml        |  8 ++++++++
 .../object_merge_duplicate_fields.01.query.sqlpp    | 21 +++++++++++++++++++++
 .../object_merge_duplicate_fields.02.query.sqlpp    | 21 +++++++++++++++++++++
 .../object_merge_duplicate_fields.03.query.sqlpp    | 21 +++++++++++++++++++++
 .../object_merge_duplicate_fields.04.query.sqlpp    | 21 +++++++++++++++++++++
 .../object_merge_duplicate_fields.04.adm            |  1 +
 .../records/RecordAddFieldsDescriptor.java          |  2 +-
 .../functions/records/RecordMergeEvaluator.java     |  2 +-
 8 files changed, 95 insertions(+), 2 deletions(-)

diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml
index 4eea44f7be..fcb3ca9cec 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/ObjectsQueries.xml
@@ -278,6 +278,14 @@
       <expected-warn>Duplicate field name 'fname1' (in line 25, at column 45)</expected-warn>
     </compilation-unit>
   </test-case>
+  <test-case FilePath="objects">
+    <compilation-unit name="object_merge_duplicate_fields">
+      <output-dir compare="Text">object_merge_duplicate_fields</output-dir>
+      <expected-error>ASX0013: Duplicate field name 'price' (in line 21, at column 1)</expected-error>
+      <expected-error>ASX0013: Duplicate field name 'city' (in line 21, at column 1)</expected-error>
+      <expected-error>ASX0013: Duplicate field name 'price' (in line 21, at column 1)</expected-error>
+    </compilation-unit>
+  </test-case>
   <test-case FilePath="objects">
     <compilation-unit name="load-record-fields">
       <output-dir compare="Text">load-record-fields</output-dir>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.01.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.01.query.sqlpp
new file mode 100644
index 0000000000..fab387715c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.01.query.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- Conflicting values for one field: the error names that field
+object_merge({"id": 1, "price": 10}, {"id": 1, "price": 12});
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.02.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.02.query.sqlpp
new file mode 100644
index 0000000000..7b1ba4774a
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.02.query.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- The conflict is inside a nested object: the error names the nested field
+object_merge({"id": 1, "address": {"city": "Irvine"}}, {"id": 1, "address": {"city": "Austin"}});
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.03.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.03.query.sqlpp
new file mode 100644
index 0000000000..edafbe6328
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.03.query.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- Conflicting values for one field: the error names that field
+object_add_fields({"id": 1, "price": 10}, [{"field-name": "price", "field-value": 12}]);
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.query.sqlpp
new file mode 100644
index 0000000000..d0a5398f51
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.query.sqlpp
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+-- Equal values for a shared field are not a conflict
+object_merge({"id": 1, "price": 10}, {"id": 1, "qty": 3});
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.adm
new file mode 100644
index 0000000000..a6deea291b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/objects/object_merge_duplicate_fields/object_merge_duplicate_fields.04.adm
@@ -0,0 +1 @@
+{ "id": 1, "price": 10, "qty": 3 }
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java
index 196d910f4a..5c616bca5e 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordAddFieldsDescriptor.java
@@ -253,7 +253,7 @@ public class RecordAddFieldsDescriptor extends AbstractScalarFunctionDynamicDesc
                                     tempValReference.set(entry.getBuf(), entry.getOffset(), entry.getLength());
                                     // If value is not equal throw conflicting duplicate field, otherwise ignore
                                     if (!PointableHelper.byteArrayEqual(valuePointable, tempValReference)) {
-                                        throw new RuntimeDataException(ErrorCode.DUPLICATE_FIELD_NAME,
+                                        throw new RuntimeDataException(ErrorCode.DUPLICATE_FIELD_NAME, sourceLoc,
                                                 LogRedactionUtil
                                                         .userData(UTF8StringUtil.toString(namePointable.getByteArray(),
                                                                 namePointable.getStartOffset() + 1)));
diff --git a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeEvaluator.java b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeEvaluator.java
index 7b9f49285e..b5d8f1077d 100644
--- a/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeEvaluator.java
+++ b/asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/functions/records/RecordMergeEvaluator.java
@@ -194,7 +194,7 @@ public class RecordMergeEvaluator extends AbstractScalarEval {
                         else {
                             // Ignore and take left field if ignore duplicate flag is true, otherwise, throw an exception
                             if (!isIgnoreDuplicates) {
-                                throw new RuntimeDataException(ErrorCode.DUPLICATE_FIELD_NAME,
+                                throw new RuntimeDataException(ErrorCode.DUPLICATE_FIELD_NAME, srcLoc,
                                         LogRedactionUtil.userData(UTF8StringUtil.toString(leftName.getByteArray(),
                                                 leftName.getStartOffset() + 1)));
                             }


(asterixdb) 08/13: [ASTERIXDB-3947][CONF] Revert option aliases and the storage renames

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 37de94478266c716c3d723122aa17b34be1155b1
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Thu Oct 8 09:01:59 2026 -0400

    [ASTERIXDB-3947][CONF] Revert option aliases and the storage renames
    
    - user model changes: yes
    - storage format changes: no
    - interface changes: yes
    
    Details: This reverts commits d88df930913e ("Separate the words of
    storage option names") and 97c82bf7be6c ("Support aliases for option
    names"). Option aliases, and the renames that rely on them, are deferred
    to a later release, so the storage options go back to their original
    names (storage.buffercache.size and so on) and IOption loses aliases().
    
    The rename of storage.buffercache.maxopendescriptors, which never needed
    an alias, stays.
    
    Ext-ref: MB-74476
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: Ie101a6ea8fdc217e83b940c820d2eecd78292584
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22032
    Reviewed-by: Murtadha Hubail <mh...@apache.org>
    Reviewed-by: Michael Blow <mb...@apache.org>
    Tested-by: Michael Blow <mb...@apache.org>
---
 .../asterix-app/src/main/resources/cc-rep.conf     |   2 +-
 asterixdb/asterix-app/src/main/resources/cc.conf   |   8 +-
 asterixdb/asterix-app/src/main/resources/cc2.conf  |   6 +-
 asterixdb/asterix-app/src/main/resources/cc3.conf  |   6 +-
 asterixdb/asterix-app/src/main/resources/cc4.conf  |   2 +-
 .../asterix-app/src/main/resources/cc_no_cbo.conf  |   8 +-
 .../src/main/resources/cc_static_partitioning.conf |   8 +-
 .../dataflow/GlobalVirtualBufferCacheTest.java     |  10 +-
 .../test/dataflow/LSMFlushRecoveryTest.java        |   4 +-
 .../test/dataflow/MultiPartitionLSMIndexTest.java  |   2 +-
 .../runtime/ClusterStateDefaultParameterTest.java  |   8 +-
 .../asterix-app/src/test/resources/cc-analyze.conf |   6 +-
 .../asterix-app/src/test/resources/cc-cbotest.conf |   6 +-
 .../test/resources/cc-cloud-storage-azblob.conf    |   6 +-
 .../src/test/resources/cc-cloud-storage-azblob.ftl |   6 +-
 .../resources/cc-cloud-storage-gcs-python.conf     |   6 +-
 .../src/test/resources/cc-cloud-storage-gcs.conf   |   6 +-
 .../src/test/resources/cc-cloud-storage-main.conf  |   6 +-
 .../src/test/resources/cc-cloud-storage-main.ftl   |   6 +-
 .../test/resources/cc-cloud-storage-merge.conf.ftl |   6 +-
 .../test/resources/cc-cloud-storage-sparse.conf    |   6 +-
 .../resources/cc-cloud-storage-sparse.conf.ftl     |   6 +-
 .../src/test/resources/cc-cloud-storage.conf       |   6 +-
 .../src/test/resources/cc-cloud-storage.conf.ftl   |   6 +-
 .../src/test/resources/cc-columnar.conf            |   6 +-
 .../asterix-app/src/test/resources/cc-main.conf    |   6 +-
 .../src/test/resources/cc-multipart.conf           |   6 +-
 .../asterix-app/src/test/resources/cc-rep-ssl.conf |   2 +-
 .../src/test/resources/cc-single-lookup.conf       |   6 +-
 .../src/test/resources/cc-single-partition.conf    |   6 +-
 .../asterix-app/src/test/resources/cc-single.conf  |   6 +-
 .../test/resources/cc-small-txn-log-partition.conf |   6 +-
 .../asterix-app/src/test/resources/cc-ssl.conf     |   6 +-
 .../asterix-app/src/test/resources/cc-storage.conf |   6 +-
 asterixdb/asterix-app/src/test/resources/cc.conf   |   6 +-
 .../api/cluster_state_1/cluster_state_1.1.regexadm |   4 +-
 .../cluster_state_1_full.1.regexadm                |   4 +-
 .../cluster_state_1_less.1.regexadm                |   4 +-
 .../asterix/common/config/ConfigConstraints.java   |  27 +++--
 .../asterix/common/config/StorageProperties.java   |  94 +++++----------
 .../common/config/ConfigConstraintsTest.java       |  22 ++--
 .../asterix-doc/src/site/markdown/ncservice.md     |  14 +--
 .../test/resources/NCServiceExecutionIT/cc.conf    |   2 +-
 .../src/test/resources/NcLifecycleIT/cc.conf       |   2 +-
 .../src/test/resources/ReplicationIT/cc.conf       |   2 +-
 .../org/apache/hyracks/api/config/IOption.java     |  22 ----
 .../control/common/config/Args4jOption.java        |   2 +-
 .../control/common/config/ConfigManager.java       |  78 +-----------
 .../control/common/config/ConfigManagerTest.java   | 132 ---------------------
 49 files changed, 180 insertions(+), 433 deletions(-)

diff --git a/asterixdb/asterix-app/src/main/resources/cc-rep.conf b/asterixdb/asterix-app/src/main/resources/cc-rep.conf
index 7d556973f3..818b8350cc 100644
--- a/asterixdb/asterix-app/src/main/resources/cc-rep.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc-rep.conf
@@ -37,7 +37,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memory.component.global.budget = 1073741824
+storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
 address = 127.0.0.1
diff --git a/asterixdb/asterix-app/src/main/resources/cc.conf b/asterixdb/asterix-app/src/main/resources/cc.conf
index 7c91cc2e3f..666702de7c 100644
--- a/asterixdb/asterix-app/src/main/resources/cc.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc.conf
@@ -37,10 +37,10 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.io.scheduler=greedy
-storage.filtered.memory.component.max.size=16MB
+storage.filtered.memorycomponent.max.size=16MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -63,4 +63,4 @@ compiler.internal.sanitycheck=true
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc2.conf b/asterixdb/asterix-app/src/main/resources/cc2.conf
index 38276958f4..2f437a44a5 100644
--- a/asterixdb/asterix-app/src/main/resources/cc2.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc2.conf
@@ -35,8 +35,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -58,4 +58,4 @@ compiler.ordered.fields=false
 compiler.parallelism=-1
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
\ No newline at end of file
+storage.buffercache.pagesize=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/main/resources/cc3.conf b/asterixdb/asterix-app/src/main/resources/cc3.conf
index 4bd3b916cd..c8903cb60d 100644
--- a/asterixdb/asterix-app/src/main/resources/cc3.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc3.conf
@@ -35,8 +35,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -58,4 +58,4 @@ compiler.ordered.fields=false
 compiler.parallelism=3
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc4.conf b/asterixdb/asterix-app/src/main/resources/cc4.conf
index 21792027fd..0d5b9adf44 100644
--- a/asterixdb/asterix-app/src/main/resources/cc4.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc4.conf
@@ -54,4 +54,4 @@ compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
 compiler.parallelism=-1
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf b/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf
index 737ea6fefd..6b497e28d0 100644
--- a/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf
@@ -37,10 +37,10 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.io.scheduler=greedy
-storage.filtered.memory.component.max.size=16MB
+storage.filtered.memorycomponent.max.size=16MB
 
 [cc]
 address = 127.0.0.1
@@ -64,4 +64,4 @@ compiler.ordered.fields=false
 compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf b/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf
index 8fd15f36df..26db39f861 100644
--- a/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf
@@ -37,10 +37,10 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.io.scheduler=greedy
-storage.filtered.memory.component.max.size=16MB
+storage.filtered.memorycomponent.max.size=16MB
 
 [cc]
 address = 127.0.0.1
@@ -62,6 +62,6 @@ compiler.ordered.fields=false
 compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 storage.compression.block=snappy
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java
index 4b457f1b32..78c64cc426 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java
@@ -266,11 +266,11 @@ public class GlobalVirtualBufferCacheTest {
 
     private void initializeNc() throws Exception {
         List<Pair<IOption, Object>> opts = new ArrayList<>();
-        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 128 * 1024L));
-        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, 1 * 1024));
-        opts.add(Pair.of(Option.STORAGE_BUFFER_CACHE_PAGE_SIZE, 1 * 1024));
-        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
-        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
+        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 128 * 1024L));
+        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, 1 * 1024));
+        opts.add(Pair.of(Option.STORAGE_BUFFERCACHE_PAGESIZE, 1 * 1024));
+        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
+        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
 
         nc.setOpts(opts);
 
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java
index b7a42232c0..7c1a534984 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java
@@ -134,8 +134,8 @@ public class LSMFlushRecoveryTest {
         // right now we've inserted 1000 records to the index, and each record is at least 12 bytes.
         // thus, the memory component size is at least 12KB.
         List<Pair<IOption, Object>> opts = new ArrayList<>();
-        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 20 * 1024 * 1024L));
-        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, 1 * 1024));
+        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 20 * 1024 * 1024L));
+        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, 1 * 1024));
         nc.setOpts(opts);
         initializeNc(false);
         initializeTestCtx();
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
index 0545de826a..cc50f2ac2e 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
@@ -138,7 +138,7 @@ public class MultiPartitionLSMIndexTest {
                 + File.separator + "resources" + File.separator + "cc-multipart.conf";
         nc = new TestNodeController(configPath, false);
         List<Pair<IOption, Object>> opts = new ArrayList<>();
-        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 16 * 1024 * 1024L));
+        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 16 * 1024 * 1024L));
         nc.setOpts(opts);
         nc.init();
         ncAppCtx = nc.getAppRuntimeContext();
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java
index df5a6abd62..3d5dad8d45 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java
@@ -79,19 +79,19 @@ public class ClusterStateDefaultParameterTest {
         int matchCount = 0;
         String[] rows = result.toString().split(",");
         for (String row : rows) {
-            if (row.contains("storage.buffer.cache.size")) {
+            if (row.contains("storage.buffercache.size")) {
                 Assert.assertTrue(getValue(row) == maxHeap / 4);
                 matchCount++;
             }
-            if (row.contains("storage.memory.component.global.budget")) {
+            if (row.contains("storage.memorycomponent.globalbudget")) {
                 Assert.assertTrue(getValue(row) == maxHeap / 4);
                 matchCount++;
             }
-            if (row.contains("storage.memory.component.flush.threshold")) {
+            if (row.contains("storage.memorycomponent.flush.threshold")) {
                 Assert.assertTrue(getDoubleValue(row) == 0.9d);
                 matchCount++;
             }
-            if (row.contains("storage.filtered.memory.component.max.size")) {
+            if (row.contains("storage.filtered.memorycomponent.max.size")) {
                 Assert.assertTrue(getValue(row) == 0);
                 matchCount++;
             }
diff --git a/asterixdb/asterix-app/src/test/resources/cc-analyze.conf b/asterixdb/asterix-app/src/test/resources/cc-analyze.conf
index 43ac4c26cf..28d0e35e9d 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-analyze.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-analyze.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -56,6 +56,6 @@ log.level = INFO
 compiler.groupmemory=64MB
 # ANALYZE statement needs more memory for sorting
 compiler.sortmemory=128MB
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 compiler.internal.sanitycheck=true
 compiler.ordered.fields=false
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf b/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf
index 5fc3eda3f2..fc78390376 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -66,4 +66,4 @@ compiler.ordered.fields=false
 compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf
index 3d012ea201..409b99b879 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=azblob
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl
index cf02db0eaa..91d87cd342 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=azblob
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf
index c6fde7ef97..d1b4bd2f64 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=gs
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
index 2fe535df79..ee65f3c1c7 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=gs
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf
index 65b1adc974..e211291953 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf
@@ -41,8 +41,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl
index 7c462db9af..edaeb5495f 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -63,7 +63,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl
index e9ee66ad33..0521ff75d4 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=8MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=8MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=default
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=2KB
+storage.buffercache.pagesize=2KB
 storage.column.max.tuple.count=200
 storage.partitioning=static
 cloud.storage.scheme=s3
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf
index bdc55ea282..4d4b035b36 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=sparse
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl
index 1347c52f30..43164d942a 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=sparse
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf
index 330b13497b..b72660f1e4 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=default
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl
index 9e9cbfcec9..da9a593a70 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=default
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-columnar.conf b/asterixdb/asterix-app/src/test/resources/cc-columnar.conf
index 6a907ca7f2..9be2c16829 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-columnar.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-columnar.conf
@@ -38,8 +38,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -61,5 +61,5 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.format=column
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-main.conf b/asterixdb/asterix-app/src/test/resources/cc-main.conf
index 47af0b2489..cdc3e6bb0f 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-main.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-main.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -60,4 +60,4 @@ compiler.textsearchmemory=160KB
 compiler.windowmemory=192KB
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
\ No newline at end of file
+storage.buffercache.pagesize=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-multipart.conf b/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
index f53375f632..6c676246fd 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
@@ -35,8 +35,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -53,4 +53,4 @@ compiler.joinmemory=256KB
 compiler.windowmemory=192KB
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf b/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf
index e53e6569d5..db4ca20201 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf
@@ -43,7 +43,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memory.component.global.budget = 1073741824
+storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
 address = 127.0.0.1
diff --git a/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf b/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf
index f6eda438de..20549a8de8 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -62,4 +62,4 @@ compiler.ordered.fields=false
 compiler.batch.lookup=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf b/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf
index 83b59d0c66..23071d6501 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf
@@ -30,8 +30,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -53,4 +53,4 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
\ No newline at end of file
+storage.buffercache.pagesize=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-single.conf b/asterixdb/asterix-app/src/test/resources/cc-single.conf
index e84594e47d..6acd5b5142 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-single.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-single.conf
@@ -27,8 +27,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -49,4 +49,4 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
index 15fa48f09a..79a805b751 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
@@ -33,8 +33,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=128MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=128MB
 
 [cc]
 address = 127.0.0.1
@@ -56,4 +56,4 @@ txn.log.partitionsize=2MB
 txn.log.buffer.pagesize=128KB
 txn.log.checkpoint.pollfrequency=2147483647
 txn.log.checkpoint.history=0
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-ssl.conf b/asterixdb/asterix-app/src/test/resources/cc-ssl.conf
index 28d8f72976..9c6dc7f87d 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-ssl.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-ssl.conf
@@ -43,8 +43,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -70,4 +70,4 @@ compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
 ssl.enabled=true
-storage.buffer.cache.page.size=32KB
\ No newline at end of file
+storage.buffercache.pagesize=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-storage.conf b/asterixdb/asterix-app/src/test/resources/cc-storage.conf
index f801f55e0b..f3a39ab8aa 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-storage.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-storage.conf
@@ -33,8 +33,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -53,7 +53,7 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
 storage.compression.block=snappy
 txn.log.checkpoint.pollfrequency=10
 txn.dataset.checkpoint.interval=10
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc.conf b/asterixdb/asterix-app/src/test/resources/cc.conf
index 591984bc7c..bdcd537b37 100644
--- a/asterixdb/asterix-app/src/test/resources/cc.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffer.cache.size=128MB
-storage.memory.component.global.budget=512MB
+storage.buffercache.size=128MB
+storage.memorycomponent.globalbudget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -62,4 +62,4 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffer.cache.page.size=32KB
+storage.buffercache.pagesize=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
index ad3c8f0396..be8ee4a1a8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
@@ -121,14 +121,14 @@
     "ssl\.enabled" : false,
     "ssl\.rmi\.verify\.peer\.identity" : true,
     "ssl\.verify\.peer\.identity" : true,
-    "storage.buffer.cache.page.size" : 32768,
+    "storage.buffercache.pagesize" : 32768,
     "storage.column.free.space.tolerance" : 0.15,
     "storage.column.max.leaf.node.size" : 10485760,
     "storage.column.max.tuple.count" : 15000,
     "storage.compression.block" : "snappy",
     "storage.format" : "row",
     "storage.global.cleanup.timeout" : 600,
-    "storage.lsm.bloom.filter.false.positive.rate" : 0.01,
+    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
     "storage.partitioning" : "dynamic",
     "storage.partitions.count" : 8,
     "txn\.commitprofiler\.enabled" : false,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
index d50d2c93db..129be13ab7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
@@ -121,14 +121,14 @@
     "ssl\.enabled" : false,
     "ssl\.rmi\.verify\.peer\.identity" : true,
     "ssl\.verify\.peer\.identity" : true,
-    "storage.buffer.cache.page.size" : 32768,
+    "storage.buffercache.pagesize" : 32768,
     "storage.column.free.space.tolerance" : 0.15,
     "storage.column.max.leaf.node.size" : 10485760,
     "storage.column.max.tuple.count" : 15000,
     "storage.compression.block" : "snappy",
     "storage.format" : "row",
     "storage.global.cleanup.timeout" : 600,
-    "storage.lsm.bloom.filter.false.positive.rate" : 0.01,
+    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
     "storage.partitioning" : "dynamic",
     "storage.partitions.count" : 8,
     "txn\.commitprofiler\.enabled" : false,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
index 1fcc8e5abb..32a395c018 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
@@ -121,14 +121,14 @@
     "ssl\.enabled" : false,
     "ssl\.rmi\.verify\.peer\.identity" : true,
     "ssl\.verify\.peer\.identity" : true,
-    "storage.buffer.cache.page.size" : 32768,
+    "storage.buffercache.pagesize" : 32768,
     "storage.column.free.space.tolerance" : 0.15,
     "storage.column.max.leaf.node.size" : 10485760,
     "storage.column.max.tuple.count" : 15000,
     "storage.compression.block" : "snappy",
     "storage.format" : "row",
     "storage.global.cleanup.timeout" : 600,
-    "storage.lsm.bloom.filter.false.positive.rate" : 0.01,
+    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
     "storage.partitioning" : "dynamic",
     "storage.partitions.count" : 8,
     "txn\.commitprofiler\.enabled" : false,
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java
index 4dae812d6e..094ffed6ae 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java
@@ -138,39 +138,40 @@ public final class ConfigConstraints {
     }
 
     private static void checkBufferCache(Function<IOption, Object> config, List<Violation> violations) {
-        Long size = longValue(config, StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE);
-        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_BUFFER_CACHE_PAGE_SIZE);
+        Long size = longValue(config, StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE);
+        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_BUFFERCACHE_PAGESIZE);
         if (size == null || pageSize == null || pageSize <= 0) {
             return;
         }
         // StorageProperties.getBufferCacheNumPages
-        checkPageCount(violations, StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE, size,
-                StorageProperties.Option.STORAGE_BUFFER_CACHE_PAGE_SIZE, pageSize + IBufferCache.RESERVED_HEADER_BYTES,
+        checkPageCount(violations, StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE, size,
+                StorageProperties.Option.STORAGE_BUFFERCACHE_PAGESIZE, pageSize + IBufferCache.RESERVED_HEADER_BYTES,
                 true);
     }
 
     private static void checkMemoryComponents(Function<IOption, Object> config, List<Violation> violations) {
-        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET);
-        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE);
+        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET);
+        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_PAGESIZE);
         if (budget == null || pageSize == null || pageSize <= 0) {
             return;
         }
         // GlobalVirtualBufferCache: VirtualBufferCache rejects a page budget of 0
-        checkPageCount(violations, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, budget,
-                StorageProperties.Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, pageSize, true);
+        checkPageCount(violations, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, budget,
+                StorageProperties.Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, pageSize, true);
     }
 
     static void checkHeap(Function<IOption, Object> config, List<Violation> violations, long maxHeapBytes) {
-        Long cacheSize = longValue(config, StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE);
-        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET);
+        Long cacheSize = longValue(config, StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE);
+        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET);
         if (cacheSize == null || budget == null) {
             return;
         }
         // StorageProperties.getJobExecutionMemoryBudget fails node startup when nothing is left for jobs
         if (cacheSize + budget >= maxHeapBytes) {
-            violations.add(new Violation(String.format("%s (%d) plus %s (%d) must be less than the maximum heap (%d)",
-                    StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE.ini(), cacheSize,
-                    StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET.ini(), budget, maxHeapBytes),
+            violations.add(new Violation(
+                    String.format("%s (%d) plus %s (%d) must be less than the maximum heap (%d)",
+                            StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE.ini(), cacheSize,
+                            StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET.ini(), budget, maxHeapBytes),
                     true));
         }
     }
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
index 76069eb071..7f193d7085 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
@@ -35,7 +35,6 @@ import static org.apache.hyracks.control.common.config.OptionTypes.getRangedLong
 import static org.apache.hyracks.util.StorageUtil.StorageUnit.KILOBYTE;
 import static org.apache.hyracks.util.StorageUtil.StorageUnit.MEGABYTE;
 
-import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
 
@@ -53,18 +52,18 @@ import org.apache.hyracks.util.StorageUtil;
 public class StorageProperties extends AbstractProperties {
 
     public enum Option implements IOption {
-        STORAGE_BUFFER_CACHE_PAGE_SIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
+        STORAGE_BUFFERCACHE_PAGESIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
         // By default, uses 1/4 of the maximum heap size for read cache, i.e., disk buffer cache.
-        STORAGE_BUFFER_CACHE_SIZE(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
-        STORAGE_BUFFER_CACHE_MAX_OPEN_FILES(NONNEGATIVE_INTEGER, Integer.MAX_VALUE),
+        STORAGE_BUFFERCACHE_SIZE(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
+        STORAGE_BUFFERCACHE_MAXOPENFILES(NONNEGATIVE_INTEGER, Integer.MAX_VALUE),
         STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS(NONNEGATIVE_INTEGER, 0),
-        STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
-        STORAGE_MEMORY_COMPONENT_PAGE_SIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
-        STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS(POSITIVE_INTEGER, 2),
-        STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.9d),
-        STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES(NONNEGATIVE_INTEGER, 0),
-        STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE(LONG_BYTE_UNIT, 0L),
-        STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.01d),
+        STORAGE_MEMORYCOMPONENT_GLOBALBUDGET(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
+        STORAGE_MEMORYCOMPONENT_PAGESIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
+        STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS(POSITIVE_INTEGER, 2),
+        STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.9d),
+        STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES(NONNEGATIVE_INTEGER, 0),
+        STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE(LONG_BYTE_UNIT, 0L),
+        STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.01d),
         STORAGE_COMPRESSION_BLOCK(STRING, "snappy"),
         STORAGE_DISK_FORCE_BYTES(LONG_BYTE_UNIT, StorageUtil.getLongSizeInBytes(16, MEGABYTE)),
         STORAGE_IO_SCHEDULER(STRING, "greedy"),
@@ -111,9 +110,9 @@ public class StorageProperties extends AbstractProperties {
         @Override
         public Section section() {
             switch (this) {
-                case STORAGE_BUFFER_CACHE_PAGE_SIZE:
+                case STORAGE_BUFFERCACHE_PAGESIZE:
                 case STORAGE_COMPRESSION_BLOCK:
-                case STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE:
+                case STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE:
                 case STORAGE_GLOBAL_CLEANUP:
                 case STORAGE_GLOBAL_CLEANUP_TIMEOUT:
                 case STORAGE_PARTITIONING:
@@ -130,44 +129,15 @@ public class StorageProperties extends AbstractProperties {
             }
         }
 
-        @Override
-        public List<String> aliases() {
-            // the names these options were released under, before their words were separated
-            switch (this) {
-                case STORAGE_BUFFER_CACHE_PAGE_SIZE:
-                    return List.of("STORAGE_BUFFERCACHE_PAGESIZE");
-                case STORAGE_BUFFER_CACHE_SIZE:
-                    return List.of("STORAGE_BUFFERCACHE_SIZE");
-                case STORAGE_BUFFER_CACHE_MAX_OPEN_FILES:
-                    return List.of("STORAGE_BUFFERCACHE_MAXOPENFILES");
-                case STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET:
-                    return List.of("STORAGE_MEMORYCOMPONENT_GLOBALBUDGET");
-                case STORAGE_MEMORY_COMPONENT_PAGE_SIZE:
-                    return List.of("STORAGE_MEMORYCOMPONENT_PAGESIZE");
-                case STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS:
-                    return List.of("STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS");
-                case STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD:
-                    return List.of("STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD");
-                case STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES:
-                    return List.of("STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES");
-                case STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE:
-                    return List.of("STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE");
-                case STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE:
-                    return List.of("STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE");
-                default:
-                    return List.of();
-            }
-        }
-
         @Override
         public String description() {
             switch (this) {
-                case STORAGE_BUFFER_CACHE_PAGE_SIZE:
+                case STORAGE_BUFFERCACHE_PAGESIZE:
                     return "The page size in bytes for pages in the buffer cache";
-                case STORAGE_BUFFER_CACHE_SIZE:
+                case STORAGE_BUFFERCACHE_SIZE:
                     return "The size of memory allocated to the disk buffer cache.  The value should be a multiple"
                             + " of the buffer cache page size.";
-                case STORAGE_BUFFER_CACHE_MAX_OPEN_FILES:
+                case STORAGE_BUFFERCACHE_MAXOPENFILES:
                     return "The maximum number of open files in the buffer cache";
                 case STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS:
                     return "The number of OS file descriptors the buffer cache aims to hold at most. Beyond it, the"
@@ -175,22 +145,22 @@ public class StorageProperties extends AbstractProperties {
                             + " writes are closed, and reopened on their next I/O. 0 means half of the process's"
                             + " maximum number of open files, or unbounded where that limit cannot be determined. Not"
                             + " applied on cloud storage";
-                case STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET:
+                case STORAGE_MEMORYCOMPONENT_GLOBALBUDGET:
                     return "The size of memory allocated to the memory components.  The value should be a multiple "
                             + "of the memory component page size";
-                case STORAGE_MEMORY_COMPONENT_PAGE_SIZE:
+                case STORAGE_MEMORYCOMPONENT_PAGESIZE:
                     return "The page size in bytes for pages allocated to memory components";
-                case STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS:
+                case STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS:
                     return "The number of memory components to be used per lsm index";
-                case STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES:
+                case STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES:
                     return "The maximum number of scheduled flush operations. 0 means that the value will be "
                             + "calculated as the number of partitions";
-                case STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD:
+                case STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD:
                     return "The memory usage threshold when memory components should be flushed";
-                case STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE:
+                case STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE:
                     return "The maximum size of a filtered memory component. 0 means that the memory component "
                             + "does not have a maximum size";
-                case STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE:
+                case STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE:
                     return "The maximum acceptable false positive rate for bloom filters associated with LSM indexes";
                 case STORAGE_COMPRESSION_BLOCK:
                     return "The default compression scheme for the storage";
@@ -289,15 +259,15 @@ public class StorageProperties extends AbstractProperties {
     }
 
     public int getBufferCachePageSize() {
-        return accessor.getInt(Option.STORAGE_BUFFER_CACHE_PAGE_SIZE);
+        return accessor.getInt(Option.STORAGE_BUFFERCACHE_PAGESIZE);
     }
 
     public long getBufferCacheSize() {
-        return accessor.getLong(Option.STORAGE_BUFFER_CACHE_SIZE);
+        return accessor.getLong(Option.STORAGE_BUFFERCACHE_SIZE);
     }
 
     public int getBufferCacheMaxOpenFiles() {
-        return accessor.getInt(Option.STORAGE_BUFFER_CACHE_MAX_OPEN_FILES);
+        return accessor.getInt(Option.STORAGE_BUFFERCACHE_MAXOPENFILES);
     }
 
     /**
@@ -315,28 +285,28 @@ public class StorageProperties extends AbstractProperties {
     }
 
     public int getMemoryComponentPageSize() {
-        return accessor.getInt(Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE);
+        return accessor.getInt(Option.STORAGE_MEMORYCOMPONENT_PAGESIZE);
     }
 
     public double getMemoryComponentFlushThreshold() {
-        return accessor.getDouble(Option.STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD);
+        return accessor.getDouble(Option.STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD);
     }
 
     public int getFilteredMemoryComponentMaxNumPages() {
-        return (int) (accessor.getLong(Option.STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE)
+        return (int) (accessor.getLong(Option.STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE)
                 / getMemoryComponentPageSize());
     }
 
     public int getMemoryComponentsNum() {
-        return accessor.getInt(Option.STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS);
+        return accessor.getInt(Option.STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS);
     }
 
     public long getMemoryComponentGlobalBudget() {
-        return accessor.getLong(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET);
+        return accessor.getLong(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET);
     }
 
     public double getBloomFilterFalsePositiveRate() {
-        return accessor.getDouble(Option.STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE);
+        return accessor.getDouble(Option.STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE);
     }
 
     public int getMaxSampleLeafAttempts() {
@@ -379,7 +349,7 @@ public class StorageProperties extends AbstractProperties {
     }
 
     public int getMaxScheduledFlushes() {
-        return accessor.getInt(Option.STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES);
+        return accessor.getInt(Option.STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES);
     }
 
     public long getJobExecutionMemoryBudget(INcApplicationContext runtimeContext) {
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java b/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java
index 88887ed338..f5aff58505 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java
@@ -42,10 +42,10 @@ public class ConfigConstraintsTest {
 
     @Before
     public void setUp() {
-        config.put(StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE, 32 * MB);
-        config.put(StorageProperties.Option.STORAGE_BUFFER_CACHE_PAGE_SIZE, (int) (128 * KB));
-        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 32 * MB);
-        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, (int) (128 * KB));
+        config.put(StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE, 32 * MB);
+        config.put(StorageProperties.Option.STORAGE_BUFFERCACHE_PAGESIZE, (int) (128 * KB));
+        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 32 * MB);
+        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, (int) (128 * KB));
         config.put(TransactionProperties.Option.TXN_LOG_BUFFER_PAGESIZE, (int) (4 * MB));
         config.put(TransactionProperties.Option.TXN_LOG_BUFFER_NUMPAGES, 8);
         config.put(TransactionProperties.Option.TXN_LOG_PARTITIONSIZE, 256 * MB);
@@ -68,17 +68,17 @@ public class ConfigConstraintsTest {
 
     @Test
     public void memoryComponentBudgetBelowOnePageIsFatal() {
-        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 64 * KB);
+        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 64 * KB);
         List<ConfigConstraints.Violation> violations = ConfigConstraints.check(config::get);
         assertEquals(1, violations.size());
         assertTrue(violations.get(0).isFatalAtStartup());
         assertTrue(violations.get(0).getMessage(),
-                violations.get(0).getMessage().contains("storage.memory.component.global.budget"));
+                violations.get(0).getMessage().contains("storage.memorycomponent.globalbudget"));
     }
 
     @Test
     public void bufferCacheBelowOnePageIsFatal() {
-        config.put(StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE, 128 * KB);
+        config.put(StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE, 128 * KB);
         List<ConfigConstraints.Violation> violations = ConfigConstraints.check(config::get);
         assertEquals(1, violations.size());
         assertTrue(violations.get(0).isFatalAtStartup());
@@ -153,22 +153,22 @@ public class ConfigConstraintsTest {
     @Test
     public void validatorRejectsViolationsTheChangeIntroduces() {
         Map<IOption, Object> proposed = new HashMap<>(config);
-        proposed.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 0L);
+        proposed.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 0L);
         proposed.put(CompilerProperties.Option.COMPILER_SORTMEMORY, KB);
         IConfigValidator validator = (option, value) -> {
         };
         IllegalArgumentException e = assertThrows(IllegalArgumentException.class,
                 () -> validator.validateChange(config::get, proposed::get));
-        assertTrue(e.getMessage(), e.getMessage().contains("storage.memory.component.global.budget"));
+        assertTrue(e.getMessage(), e.getMessage().contains("storage.memorycomponent.globalbudget"));
         assertTrue(e.getMessage(), e.getMessage().contains("compiler.sortmemory"));
     }
 
     @Test
     public void validatorAllowsCorrectingOneOfSeveralViolations() {
-        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 0L);
+        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 0L);
         config.put(CompilerProperties.Option.COMPILER_SORTMEMORY, KB);
         Map<IOption, Object> proposed = new HashMap<>(config);
-        proposed.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 32 * MB);
+        proposed.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 32 * MB);
         IConfigValidator validator = (option, value) -> {
         };
         validator.validateChange(config::get, proposed::get);
diff --git a/asterixdb/asterix-doc/src/site/markdown/ncservice.md b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
index 86999db92f..4ce41ec39b 100644
--- a/asterixdb/asterix-doc/src/site/markdown/ncservice.md
+++ b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
@@ -325,13 +325,13 @@ The following parameters for slave processes, under "[nc]" sections.
 |   nc    | result.sweep.threshold                    | The duration within which an instance of the result cleanup should be invoked in milliseconds | 60000 |
 |   nc    | result.ttl                                | Limits the amount of time results for asynchronous jobs should be retained by the system in milliseconds | 86400000 |
 |   nc    | storage.buffer.cache.max.open.descriptors | The number of OS file descriptors the buffer cache aims to hold at most. Beyond it, the descriptors of the least recently used files with no I/O in progress and no unforced writes are closed, and reopened on their next I/O. 0 means half of the process's maximum number of open files, or unbounded where that limit cannot be determined. Not applied on cloud storage | 0 |
-|   nc    | storage.buffer.cache.max.open.files       | The maximum number of open files in the buffer cache | 2147483647 |
-|   nc    | storage.buffer.cache.page.size            | The page size in bytes for pages in the buffer cache | 131072 (128 kB) |
-|   nc    | storage.buffer.cache.size                 | The size of memory allocated to the disk buffer cache.  The value should be a multiple of the buffer cache page size. | 1/4 of the JVM allocated memory |
-|   nc    | storage.lsm.bloom.filter.false.positive.rate | The maximum acceptable false positive rate for bloom filters associated with LSM indexes | 0.01 |
-|   nc    | storage.memory.component.global.budget    | The size of memory allocated to the memory components.  The value should be a multiple of the memory component page size | 1/4 of the JVM allocated memory |
-|   nc    | storage.memory.component.num.components   | The number of memory components to be used per lsm index | 2 |
-|   nc    | storage.memory.component.page.size        | The page size in bytes for pages allocated to memory components | 131072 (128 kB) |
+|   nc    | storage.buffercache.maxopenfiles          | The maximum number of open files in the buffer cache | 2147483647 |
+|   nc    | storage.buffercache.pagesize              | The page size in bytes for pages in the buffer cache | 131072 (128 kB) |
+|   nc    | storage.buffercache.size                  | The size of memory allocated to the disk buffer cache.  The value should be a multiple of the buffer cache page size. | 1/4 of the JVM allocated memory |
+|   nc    | storage.lsm.bloomfilter.falsepositiverate | The maximum acceptable false positive rate for bloom filters associated with LSM indexes | 0.01 |
+|   nc    | storage.memorycomponent.globalbudget      | The size of memory allocated to the memory components.  The value should be a multiple of the memory component page size | 1/4 of the JVM allocated memory |
+|   nc    | storage.memorycomponent.numcomponents     | The number of memory components to be used per lsm index | 2 |
+|   nc    | storage.memorycomponent.pagesize          | The page size in bytes for pages allocated to memory components | 131072 (128 kB) |
 |   nc    | storage.metadata.memorycomponent.numpages | The number of pages to allocate for a metadata memory component | 8 |
 |   nc    | txn.log.dir                               | The directory where transaction logs should be stored | ${java.io.tmpdir}/asterixdb/txn-log |
 
diff --git a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
index d7a1c00cd1..12fb27a484 100644
--- a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
@@ -36,7 +36,7 @@ jvm.args=-Xmx5g -Dfile.encoding=us-ascii
 address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
-storage.memory.component.global.budget = 1073741824
+storage.memorycomponent.globalbudget = 1073741824
 result.sweep.threshold=1000
 
 [cc]
diff --git a/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf b/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
index f6af7ecf9f..a5a437a477 100644
--- a/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
@@ -36,7 +36,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memory.component.global.budget = 1073741824
+storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
 address = 127.0.0.1
diff --git a/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
index 1edadb05dd..bef0a3cbf7 100644
--- a/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
@@ -37,7 +37,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memory.component.global.budget = 1073741824
+storage.memorycomponent.globalbudget = 1073741824
 
 [cc]
 address = 127.0.0.1
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java
index 75b90eed95..0b75436877 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java
@@ -18,7 +18,6 @@
  */
 package org.apache.hyracks.api.config;
 
-import java.util.List;
 import java.util.function.Function;
 
 import org.apache.hyracks.util.LogRedactionUtil;
@@ -80,27 +79,6 @@ public interface IOption {
         return StringUtil.toCamelCase(name());
     }
 
-    /**
-     * @return former names of this option, in the same form as {@link #name()}, that are still accepted wherever an
-     *         option is set by name (ini, command line, lookup by name), but are never emitted. Lets an option be
-     *         renamed without breaking configurations that use its old name.
-     */
-    default List<String> aliases() {
-        return List.of();
-    }
-
-    default List<String> iniAliases() {
-        return aliases().stream().map(IOption::toIni).toList();
-    }
-
-    default List<String> cmdlineAliases() {
-        return aliases().stream().map(alias -> "-" + alias.toLowerCase().replace("_", "-")).toList();
-    }
-
-    default List<String> camelCaseAliases() {
-        return aliases().stream().map(StringUtil::toCamelCase).toList();
-    }
-
     default String toIniString() {
         return "[" + section().sectionName() + "] " + ini();
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java
index 1663990245..c904d0bc8b 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java
@@ -46,7 +46,7 @@ class Args4jOption implements Option {
 
     @Override
     public String[] aliases() {
-        return option.cmdlineAliases().toArray(new String[0]);
+        return new String[0];
     }
 
     @Override
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
index f8eb74124b..894382f16b 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
@@ -39,7 +39,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
-import java.util.concurrent.ConcurrentHashMap;
 import java.util.function.BiConsumer;
 import java.util.function.Consumer;
 import java.util.function.Function;
@@ -73,7 +72,6 @@ public class ConfigManager implements IConfigManager, Serializable {
 
     private static final long serialVersionUID = 1L;
     private static final Logger LOGGER = LogManager.getLogger();
-    private static final Set<String> WARNED_ALIASES = ConcurrentHashMap.newKeySet();
 
     private HashSet<IOption> registeredOptions = new HashSet<>();
     @SuppressWarnings("squid:S1948") // HashMap is serializable, and therefore so is its synchronized map
@@ -84,7 +82,6 @@ public class ConfigManager implements IConfigManager, Serializable {
     private Map<IOption, Object> configurationMap =
             Collections.synchronizedMap(new CompositeMap<>(definedMap, defaultMap, new NoOpMapMutator()));
     private EnumMap<Section, Map<String, IOption>> sectionMap = new EnumMap<>(Section.class);
-    private EnumMap<Section, Map<String, IOption>> aliasMap = new EnumMap<>(Section.class);
     @SuppressWarnings("squid:S1948") // TreeMap is serializable, and therefore so is its synchronized map
     private Map<String, Map<IOption, Object>> nodeSpecificDefinedMap = Collections.synchronizedMap(new TreeMap<>());
     @SuppressWarnings("squid:S1948") // TreeMap is serializable, and therefore so is its synchronized map
@@ -154,11 +151,6 @@ public class ConfigManager implements IConfigManager, Serializable {
             }
             LOGGER.trace("registering option: {}", option::toIniString);
             Map<String, IOption> optionMap = sectionMap.computeIfAbsent(option.section(), section -> new HashMap<>());
-            IOption aliased = aliasMap.getOrDefault(option.section(), Collections.emptyMap()).get(option.ini());
-            if (aliased != null) {
-                throw new IllegalStateException(
-                        "Option " + option.toIniString() + " collides with an alias of " + aliased.toIniString());
-            }
             IOption prev = optionMap.put(option.ini(), option);
             if (prev != null) {
                 if (prev != option) {
@@ -166,7 +158,6 @@ public class ConfigManager implements IConfigManager, Serializable {
                             + option.toIniString() + ": " + Arrays.asList(option.getClass(), prev.getClass()));
                 }
             } else {
-                registerAliases(option, optionMap);
                 registeredOptions.add(option);
                 optionSetters.put(option, (node, value, isDefault) -> correctedMap(node, isDefault).put(option, value));
                 if (LOGGER.isDebugEnabled()) {
@@ -184,38 +175,6 @@ public class ConfigManager implements IConfigManager, Serializable {
         }
     }
 
-    private void registerAliases(IOption option, Map<String, IOption> optionMap) {
-        Map<String, IOption> aliases = aliasMap.computeIfAbsent(option.section(), section -> new HashMap<>());
-        for (String alias : option.iniAliases()) {
-            IOption existing = optionMap.get(alias);
-            if (existing == null) {
-                existing = aliases.putIfAbsent(alias, option);
-            }
-            if (existing != null) {
-                throw new IllegalStateException("Alias [" + option.section().sectionName() + "] " + alias + " of "
-                        + option.toIniString() + " collides with " + existing.toIniString());
-            }
-        }
-    }
-
-    /**
-     * @return the option that {@code name} is an alias of in {@code section}, or null if it is not one
-     */
-    private IOption resolveAlias(Section section, String name) {
-        Map<String, IOption> aliases = section == null ? null : aliasMap.get(section);
-        IOption option = aliases == null ? null : aliases.get(name);
-        if (option != null) {
-            warnAlias("[" + section.sectionName() + "] " + name, option.toIniString());
-        }
-        return option;
-    }
-
-    private static void warnAlias(String alias, String canonical) {
-        if (WARNED_ALIASES.add(alias)) {
-            LOGGER.warn("option {} is deprecated; use {} instead", alias, canonical);
-        }
-    }
-
     private Map<IOption, Object> correctedMap(String node, boolean isDefault) {
         if (node == null) {
             return isDefault ? defaultMap : definedMap;
@@ -267,9 +226,8 @@ public class ConfigManager implements IConfigManager, Serializable {
     }
 
     public IOption lookupOption(String section, String key) {
-        Section parsedSection = Section.parseSectionName(section);
-        IOption option = getSectionOptionMap(parsedSection).get(key);
-        return option != null ? option : resolveAlias(parsedSection, key);
+        Map<String, IOption> map = getSectionOptionMap(Section.parseSectionName(section));
+        return map == null ? null : map.get(key);
     }
 
     public void processConfig() throws CmdLineException, IOException {
@@ -325,7 +283,6 @@ public class ConfigManager implements IConfigManager, Serializable {
             }
         }
         commandLineOptions.sort(Comparator.comparing(IOption::cmdline));
-        checkCommandLineAliases(cmdLineParser, commandLineOptions);
 
         commandLineOptions.forEach(option -> cmdLineParser.addOption(new Args4jSetter(option, setAction, false),
                 new Args4jOption(option, this, option.type().targetType())));
@@ -359,26 +316,6 @@ public class ConfigManager implements IConfigManager, Serializable {
         return appArgs;
     }
 
-    private void checkCommandLineAliases(CmdLineParser cmdLineParser, List<IOption> options) throws CmdLineException {
-        if (args == null) {
-            return;
-        }
-        Set<String> given = Stream.of(args).map(arg -> arg.split("=", 2)[0]).collect(Collectors.toSet());
-        for (IOption option : options) {
-            for (String alias : option.cmdlineAliases()) {
-                if (!given.contains(alias)) {
-                    continue;
-                }
-                if (given.contains(option.cmdline())) {
-                    throw new CmdLineException(cmdLineParser,
-                            "both " + option.cmdline() + " and its deprecated alias " + alias + " were specified",
-                            null);
-                }
-                warnAlias(alias, option.cmdline());
-            }
-        }
-    }
-
     private void parseIni() throws IOException {
         Ini ini = null;
         for (IOption option : iniPointerOptions) {
@@ -413,19 +350,12 @@ public class ConfigManager implements IConfigManager, Serializable {
                 throw new HyracksException("Unknown section in ini: " + section.getName());
             }
             Map<String, IOption> optionMap = getSectionOptionMap(rootSection);
-            Map<IOption, String> setBy = new HashMap<>();
             for (String name : section.keySet()) {
-                final IOption canonical = optionMap.get(name);
-                final IOption option = canonical != null ? canonical : resolveAlias(rootSection, name);
+                final IOption option = optionMap == null ? null : optionMap.get(name);
                 if (option == null) {
                     handleUnknownOption(section, name);
                     return;
                 }
-                final String otherName = setBy.put(option, name);
-                if (otherName != null) {
-                    throw new HyracksException("Both " + otherName + " and " + name + " set " + option.toIniString()
-                            + " in [" + section.getName() + "]; remove the deprecated one");
-                }
                 final List<String> values = section.getAll(name);
                 if (values.size() <= 1) {
                     LOGGER.debug("setting " + option.toIniString() + " to " + values.get(0));
@@ -448,7 +378,7 @@ public class ConfigManager implements IConfigManager, Serializable {
     private void handleUnknownOption(Profile.Section section, String name) throws HyracksException {
         Set<String> matches = new HashSet<>();
         for (IOption registeredOption : registeredOptions) {
-            if (registeredOption.ini().equals(name) || registeredOption.iniAliases().contains(name)) {
+            if (registeredOption.ini().equals(name)) {
                 matches.add(registeredOption.section().sectionName());
             }
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java
index 1a4e30ae3e..8bc1259b1d 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java
@@ -18,9 +18,6 @@
  */
 package org.apache.hyracks.control.common.config;
 
-import java.io.File;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
@@ -34,14 +31,8 @@ import org.apache.commons.lang3.mutable.MutableObject;
 import org.apache.hyracks.api.config.IOption;
 import org.apache.hyracks.api.config.IOptionType;
 import org.apache.hyracks.api.config.Section;
-import org.apache.hyracks.api.exceptions.HyracksException;
-import org.apache.hyracks.control.common.controllers.ControllerConfig;
 import org.apache.hyracks.util.Span;
-import org.junit.Assert;
-import org.junit.Rule;
 import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-import org.kohsuke.args4j.CmdLineException;
 
 public class ConfigManagerTest {
 
@@ -73,70 +64,8 @@ public class ConfigManagerTest {
         }
     }
 
-    public enum AliasedOption implements IOption {
-        RENAMED_OPTION(List.of("RENAMEDOPTION"));
-
-        private final List<String> aliases;
-
-        AliasedOption(List<String> aliases) {
-            this.aliases = aliases;
-        }
-
-        @Override
-        public Section section() {
-            return Section.COMMON;
-        }
-
-        @Override
-        public String description() {
-            return "Description for " + name();
-        }
-
-        @Override
-        public IOptionType type() {
-            return OptionTypes.INTEGER;
-        }
-
-        @Override
-        public Object defaultValue() {
-            return 0;
-        }
-
-        @Override
-        public List<String> aliases() {
-            return aliases;
-        }
-    }
-
-    public enum CollidingOption implements IOption {
-        RENAMEDOPTION;
-
-        @Override
-        public Section section() {
-            return Section.COMMON;
-        }
-
-        @Override
-        public String description() {
-            return "Description for " + name();
-        }
-
-        @Override
-        public IOptionType type() {
-            return OptionTypes.INTEGER;
-        }
-
-        @Override
-        public Object defaultValue() {
-            return 0;
-        }
-    }
-
     private static final Random RANDOM = new Random();
 
-    @Rule
-    public TemporaryFolder tempFolder = new TemporaryFolder();
-
     @Test
     public void testConcurrentUpdates() throws Exception {
         ConfigManager configManager = new ConfigManager();
@@ -176,67 +105,6 @@ public class ConfigManagerTest {
         }
     }
 
-    @Test
-    public void testIniAlias() throws Exception {
-        ConfigManager configManager = aliasedConfigManager(iniArgs("renamedoption = 7"));
-        configManager.processConfig();
-        Assert.assertEquals(7, configManager.get(AliasedOption.RENAMED_OPTION));
-    }
-
-    @Test
-    public void testIniAliasWithCanonicalNameRejected() throws Exception {
-        ConfigManager configManager = aliasedConfigManager(iniArgs("renamedoption = 7", "renamed.option = 8"));
-        HyracksException e = Assert.assertThrows(HyracksException.class, configManager::processConfig);
-        Assert.assertTrue(e.getMessage(), e.getMessage().contains("renamed.option"));
-    }
-
-    @Test
-    public void testCommandLineAlias() throws Exception {
-        ConfigManager configManager = aliasedConfigManager(new String[] { "-renamedoption", "5" });
-        configManager.processConfig();
-        Assert.assertEquals(5, configManager.get(AliasedOption.RENAMED_OPTION));
-    }
-
-    @Test
-    public void testCommandLineAliasWithCanonicalNameRejected() {
-        ConfigManager configManager =
-                aliasedConfigManager(new String[] { "-renamedoption", "5", "-renamed-option", "6" });
-        Assert.assertThrows(CmdLineException.class, configManager::processConfig);
-    }
-
-    @Test
-    public void testLookupByAlias() {
-        ConfigManager configManager = aliasedConfigManager(null);
-        Assert.assertEquals(AliasedOption.RENAMED_OPTION, configManager.lookupOption("common", "renamedoption"));
-        Assert.assertEquals(AliasedOption.RENAMED_OPTION, configManager.lookupOption("common", "renamed.option"));
-        Assert.assertNull(configManager.lookupOption("nc", "renamedoption"));
-    }
-
-    @Test
-    public void testAliasCollidingWithOptionRejected() {
-        ConfigManager aliasFirst = new ConfigManager();
-        aliasFirst.register(AliasedOption.class);
-        Assert.assertThrows(IllegalStateException.class, () -> aliasFirst.register(CollidingOption.class));
-        ConfigManager optionFirst = new ConfigManager();
-        optionFirst.register(CollidingOption.class);
-        Assert.assertThrows(IllegalStateException.class, () -> optionFirst.register(AliasedOption.class));
-    }
-
-    private String[] iniArgs(String... lines) throws Exception {
-        File ini = tempFolder.newFile("aliases.ini");
-        Files.writeString(ini.toPath(), "[common]\n" + String.join("\n", lines) + "\n", StandardCharsets.UTF_8);
-        return new String[] { "-config-file", ini.getAbsolutePath() };
-    }
-
-    private static ConfigManager aliasedConfigManager(String[] args) {
-        ConfigManager configManager = new ConfigManager(args);
-        configManager.addIniParamOptions(ControllerConfig.Option.CONFIG_FILE);
-        configManager.addCmdLineSections(Section.COMMON);
-        configManager.register(ControllerConfig.Option.class);
-        configManager.register(AliasedOption.class);
-        return configManager;
-    }
-
     private static Option randomOption() {
         return Option.values()[RANDOM.nextInt(Option.values().length)];
     }


(asterixdb) 10/13: [NO ISSUE][COMP] Log pushdown variable lookups at trace level

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 49c1b80b069bf7d60d772ee832d8b76cdbf58d4e
Author: Ritik Raj <ra...@gmail.com>
AuthorDate: Thu Oct 8 14:54:22 2026 +0530

    [NO ISSUE][COMP] Log pushdown variable lookups at trace level
    
    The pushdown context logs a warning for every variable that is used
    without a definition it tracks, or defined twice. Both happen during
    normal query compilation, so the warnings fill the logs without pointing
    at a problem.
    
    Ext-ref: MB-74490
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: I51a978af3646326b38556dcb6032d6fb22a201fb
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22029
    Tested-by: Ritik Raj <ri...@couchbase.com>
    Reviewed-by: Ritik Raj <ri...@couchbase.com>
    Reviewed-by: Murtadha Hubail <mh...@apache.org>
---
 .../org/apache/asterix/optimizer/rules/pushdown/PushdownContext.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/PushdownContext.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/PushdownContext.java
index cc31ddec8d..fe39a44010 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/PushdownContext.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/pushdown/PushdownContext.java
@@ -116,7 +116,7 @@ public class PushdownContext {
     public void define(LogicalVariable variable, ILogicalOperator operator, ILogicalExpression expression,
             int expressionIndex) {
         if (defineChain.containsKey(variable)) {
-            LOGGER.warn("Variable {}  declared twice", variable);
+            LOGGER.trace("Variable {} declared twice", variable);
             return;
         } else if (definedVariable.containsKey(expression)) {
             DefineDescriptor defineDescriptor = definedVariable.get(expression);
@@ -147,7 +147,7 @@ public class PushdownContext {
             DefineDescriptor defineDescriptor = defineChain.get(variable);
             if (defineDescriptor == null) {
                 // Log to track any definition that we may have missed
-                LOGGER.warn("Variable {} is not defined", variable);
+                LOGGER.trace("Variable {} is not defined", variable);
                 continue;
             }
 


(asterixdb) 03/13: Null merge branch 'gerrit/morpheus' into 'gerrit/helios'

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 9557d5de2a00581ec763cedcb1161ce633c38eec
Merge: e1be1de71f 2a1f22076d
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Wed Oct 7 21:48:01 2026 -0400

    Null merge branch 'gerrit/morpheus' into 'gerrit/helios'
    
     * [ASTERIXDB-3851][NET][BP] Identify the peer on inter-node TLS
       (MB-74402)
    
    Ext-ref: MB-72786
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: Ibbae5d2e2c218224c4e87e43f4d9273ed8652860



(asterixdb) 13/13: Merge branch 'gerrit/helios' into 'master'

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 4ab052e71863300300ee290fa360f44cfa84c690
Merge: e1be1de71f 7f16ff6907
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Thu Oct 8 14:53:50 2026 -0400

    Merge branch 'gerrit/helios' into 'master'
    
     * [ASTERIXDB-3851][NET][BP] Identify the peer on inter-node TLS
       (MB-74402)
     * [ASTERIXDB-3947][STO] Rename the max open descriptors option
       (MB-74476)
     * [ASTERIXDB-3947][CONF] Support aliases for option names (MB-74476)
     * [ASTERIXDB-3944][STO] Fix column range filters (MB-74478,MB-74479)
     * [ASTERIXDB-3947][STO] Separate the words of storage option names
       (MB-74476)
     * [ASTERIXDB-3947][CONF] Revert option aliases and the storage renames
       (MB-74476)
     * [NO ISSUE][RT] Locate duplicate field errors and test the field named
       (MB-74440)
     * [NO ISSUE][COMP] Log pushdown variable lookups at trace level
       (MB-74490)
     * [NO ISSUE][COMP] Fix CME in index-only ANN plan with
       cross-pollination (MB-74445)
     * [ASTERIXDB-3949][STO] Merge secondary indexes of atomic datasets
       (MB-74490)
    
    Ext-ref: MB-74402,MB-74476,MB-74478,MB-74479,MB-74440,MB-74490,MB-74445
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: Ic764dcc0d241b5e0198b79bd9904c38a196b2892

 .../rules/am/VectorIndexAccessMethod.java          |   4 +-
 .../optimizer/rules/pushdown/PushdownContext.java  |   4 +-
 .../asterix/app/message/EnableMergeMessage.java    |   4 +-
 .../constant-left/constant-left.001.ddl.sqlpp}     |  37 +--
 .../constant-left/constant-left.002.update.sqlpp}  |  38 +--
 .../constant-left/constant-left.003.get.http}      |  33 +--
 .../constant-left/constant-left.004.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.005.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.006.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.007.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.008.query.sqlpp}   |  34 +--
 .../constant-left/constant-left.009.query.sqlpp}   |  34 +--
 .../filter/double-nan/double-nan.001.ddl.sqlpp}    |  37 +--
 .../filter/double-nan/double-nan.002.update.sqlpp} |  40 +--
 .../filter/double-nan/double-nan.003.get.http}     |  33 +--
 .../filter/double-nan/double-nan.004.query.sqlpp}  |  34 +--
 .../filter/double-nan/double-nan.005.query.sqlpp}  |  34 +--
 .../queries_sqlpp/objects/ObjectsQueries.xml       |   8 +
 .../object_merge_duplicate_fields.01.query.sqlpp}  |  33 +--
 .../object_merge_duplicate_fields.02.query.sqlpp}  |  33 +--
 .../object_merge_duplicate_fields.03.query.sqlpp}  |  33 +--
 .../object_merge_duplicate_fields.04.query.sqlpp}  |  33 +--
 .../atomic-secondary-merge.1.ddl.sqlpp}            |  34 +--
 .../atomic-secondary-merge.2.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.3.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.4.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.5.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.6.update.sqlpp}         |  33 +--
 .../atomic-secondary-merge.7.pollquery.sqlpp}      |  37 +--
 .../atomic-secondary-merge.8.ddl.sqlpp}            |  33 +--
 .../queries_sqlpp/vector/VectorQueries.xml         |   5 +
 .../vtree-cross-pollination-include.1.ddl.sqlpp}   |  44 +---
 .../vtree-cross-pollination-include.2.update.sqlpp |  33 +++
 .../vtree-cross-pollination-include.3.ddl.sqlpp}   |  32 +--
 .../vtree-cross-pollination-include.4.ddl.sqlpp}   |  37 +--
 .../vtree-cross-pollination-include.5.query.sqlpp} |  37 +--
 .../vtree-cross-pollination-include.6.query.sqlpp} |  37 +--
 .../vtree-cross-pollination-include.7.plans.sqlpp} |  38 +--
 .../vtree-cross-pollination-include.99.ddl.sqlpp}  |  32 +--
 .../constant-left/constant-left.003.regexadm       |   1 +
 .../filter/constant-left/constant-left.004.adm     |   1 +
 .../filter/constant-left/constant-left.005.adm     |   1 +
 .../filter/constant-left/constant-left.006.adm     |   1 +
 .../filter/constant-left/constant-left.007.adm     |   1 +
 .../filter/constant-left/constant-left.008.adm     |   1 +
 .../filter/constant-left/constant-left.009.adm     |   1 +
 .../filter/double-nan/double-nan.003.regexadm      |   1 +
 .../column/filter/double-nan/double-nan.004.adm    |   3 +
 .../column/filter/double-nan/double-nan.005.adm    |   5 +
 .../object_merge_duplicate_fields.04.adm           |   1 +
 .../atomic-secondary-merge.7.adm                   |   1 +
 .../vtree-cross-pollination-include.5.adm          |   3 +
 .../vtree-cross-pollination-include.6.adm          |   3 +
 .../vtree-cross-pollination-include.7.plan         |  34 +++
 .../vtree-cross-pollination-include.7.plan         |  34 +++
 .../vtree-cross-pollination-include.7.plan         |  34 +++
 .../src/test/resources/runtimets/sqlpp_queries.xml |  10 +
 .../runtimets/testsuite_single_partition_sqlpp.xml |  10 +
 .../test/resources/runtimets/testsuite_storage.xml |   5 +
 .../accessor/ColumnRangeFilterValueAccessor.java   |   7 +
 .../AbstractColumnFilterComparatorFactory.java     |  10 +
 .../compartor/GEColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/GTColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/LEColumnFilterEvaluatorFactory.java  |   3 +-
 .../compartor/LTColumnFilterEvaluatorFactory.java  |   3 +-
 .../writer/filters/DoubleColumnFilterWriter.java   |  16 +-
 .../column/test/filter/NumericFilterTest.java      | 281 +++++++++++++++++++++
 .../asterix/common/config/StorageProperties.java   |   6 +-
 .../asterix-doc/src/site/markdown/ncservice.md     |   2 +-
 .../utils/filter/ColumnRangeFilterBuilder.java     |  13 +-
 .../records/RecordAddFieldsDescriptor.java         |   2 +-
 .../functions/records/RecordMergeEvaluator.java    |   2 +-
 .../transaction/AtomicNoWALTransactionContext.java |  10 +-
 73 files changed, 676 insertions(+), 1042 deletions(-)


(asterixdb) 07/13: [ASTERIXDB-3947][STO] Separate the words of storage option names

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit d88df930913e3853bdd990b60906ff0c533099d4
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Wed Oct 7 21:01:57 2026 -0400

    [ASTERIXDB-3947][STO] Separate the words of storage option names
    
    - user model changes: yes
    - storage format changes: no
    - interface changes: no
    
    Details: Ten storage options were named with their words run together,
    so their keys read storage.buffercache.size,
    storage.memorycomponent.pagesize and so on. Rename them, keeping each
    old name as an alias so that existing configurations still apply:
    
      STORAGE_BUFFERCACHE_PAGESIZE    -> STORAGE_BUFFER_CACHE_PAGE_SIZE
      STORAGE_BUFFERCACHE_SIZE        -> STORAGE_BUFFER_CACHE_SIZE
      STORAGE_BUFFERCACHE_MAXOPENFILES
        -> STORAGE_BUFFER_CACHE_MAX_OPEN_FILES
      STORAGE_MEMORYCOMPONENT_GLOBALBUDGET
        -> STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET
      STORAGE_MEMORYCOMPONENT_PAGESIZE
        -> STORAGE_MEMORY_COMPONENT_PAGE_SIZE
      STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS
        -> STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS
      STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD
        -> STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD
      STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES
        -> STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES
      STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE
        -> STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE
      STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE
        -> STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE
    
    The bundled and test configuration files, the documentation and the
    expected cluster state results use the new names.
    
    Ext-ref: MB-74476
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: Iafc2b6ac4fc856d7839da6ed1db365ce16b3a210
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22021
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Hussain Altowileb <hu...@gmail.com>
    Reviewed-by: Michael Blow <mb...@apache.org>
---
 .../asterix-app/src/main/resources/cc-rep.conf     |  2 +-
 asterixdb/asterix-app/src/main/resources/cc.conf   |  8 +-
 asterixdb/asterix-app/src/main/resources/cc2.conf  |  6 +-
 asterixdb/asterix-app/src/main/resources/cc3.conf  |  6 +-
 asterixdb/asterix-app/src/main/resources/cc4.conf  |  2 +-
 .../asterix-app/src/main/resources/cc_no_cbo.conf  |  8 +-
 .../src/main/resources/cc_static_partitioning.conf |  8 +-
 .../dataflow/GlobalVirtualBufferCacheTest.java     | 10 +--
 .../test/dataflow/LSMFlushRecoveryTest.java        |  4 +-
 .../test/dataflow/MultiPartitionLSMIndexTest.java  |  2 +-
 .../runtime/ClusterStateDefaultParameterTest.java  |  8 +-
 .../asterix-app/src/test/resources/cc-analyze.conf |  6 +-
 .../asterix-app/src/test/resources/cc-cbotest.conf |  6 +-
 .../test/resources/cc-cloud-storage-azblob.conf    |  6 +-
 .../src/test/resources/cc-cloud-storage-azblob.ftl |  6 +-
 .../resources/cc-cloud-storage-gcs-python.conf     |  6 +-
 .../src/test/resources/cc-cloud-storage-gcs.conf   |  6 +-
 .../src/test/resources/cc-cloud-storage-main.conf  |  6 +-
 .../src/test/resources/cc-cloud-storage-main.ftl   |  6 +-
 .../test/resources/cc-cloud-storage-merge.conf.ftl |  6 +-
 .../test/resources/cc-cloud-storage-sparse.conf    |  6 +-
 .../resources/cc-cloud-storage-sparse.conf.ftl     |  6 +-
 .../src/test/resources/cc-cloud-storage.conf       |  6 +-
 .../src/test/resources/cc-cloud-storage.conf.ftl   |  6 +-
 .../src/test/resources/cc-columnar.conf            |  6 +-
 .../asterix-app/src/test/resources/cc-main.conf    |  6 +-
 .../src/test/resources/cc-multipart.conf           |  6 +-
 .../asterix-app/src/test/resources/cc-rep-ssl.conf |  2 +-
 .../src/test/resources/cc-single-lookup.conf       |  6 +-
 .../src/test/resources/cc-single-partition.conf    |  6 +-
 .../asterix-app/src/test/resources/cc-single.conf  |  6 +-
 .../test/resources/cc-small-txn-log-partition.conf |  6 +-
 .../asterix-app/src/test/resources/cc-ssl.conf     |  6 +-
 .../asterix-app/src/test/resources/cc-storage.conf |  6 +-
 asterixdb/asterix-app/src/test/resources/cc.conf   |  6 +-
 .../api/cluster_state_1/cluster_state_1.1.regexadm |  4 +-
 .../cluster_state_1_full.1.regexadm                |  4 +-
 .../cluster_state_1_less.1.regexadm                |  4 +-
 .../asterix/common/config/ConfigConstraints.java   | 27 +++----
 .../asterix/common/config/StorageProperties.java   | 94 ++++++++++++++--------
 .../common/config/ConfigConstraintsTest.java       | 22 ++---
 .../asterix-doc/src/site/markdown/ncservice.md     | 14 ++--
 .../test/resources/NCServiceExecutionIT/cc.conf    |  2 +-
 .../src/test/resources/NcLifecycleIT/cc.conf       |  2 +-
 .../src/test/resources/ReplicationIT/cc.conf       |  2 +-
 45 files changed, 204 insertions(+), 175 deletions(-)

diff --git a/asterixdb/asterix-app/src/main/resources/cc-rep.conf b/asterixdb/asterix-app/src/main/resources/cc-rep.conf
index 818b8350cc..7d556973f3 100644
--- a/asterixdb/asterix-app/src/main/resources/cc-rep.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc-rep.conf
@@ -37,7 +37,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memorycomponent.globalbudget = 1073741824
+storage.memory.component.global.budget = 1073741824
 
 [cc]
 address = 127.0.0.1
diff --git a/asterixdb/asterix-app/src/main/resources/cc.conf b/asterixdb/asterix-app/src/main/resources/cc.conf
index 666702de7c..7c91cc2e3f 100644
--- a/asterixdb/asterix-app/src/main/resources/cc.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc.conf
@@ -37,10 +37,10 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.io.scheduler=greedy
-storage.filtered.memorycomponent.max.size=16MB
+storage.filtered.memory.component.max.size=16MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -63,4 +63,4 @@ compiler.internal.sanitycheck=true
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc2.conf b/asterixdb/asterix-app/src/main/resources/cc2.conf
index 2f437a44a5..38276958f4 100644
--- a/asterixdb/asterix-app/src/main/resources/cc2.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc2.conf
@@ -35,8 +35,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -58,4 +58,4 @@ compiler.ordered.fields=false
 compiler.parallelism=-1
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
\ No newline at end of file
+storage.buffer.cache.page.size=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/main/resources/cc3.conf b/asterixdb/asterix-app/src/main/resources/cc3.conf
index c8903cb60d..4bd3b916cd 100644
--- a/asterixdb/asterix-app/src/main/resources/cc3.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc3.conf
@@ -35,8 +35,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -58,4 +58,4 @@ compiler.ordered.fields=false
 compiler.parallelism=3
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc4.conf b/asterixdb/asterix-app/src/main/resources/cc4.conf
index 0d5b9adf44..21792027fd 100644
--- a/asterixdb/asterix-app/src/main/resources/cc4.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc4.conf
@@ -54,4 +54,4 @@ compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
 compiler.parallelism=-1
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf b/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf
index 6b497e28d0..737ea6fefd 100644
--- a/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc_no_cbo.conf
@@ -37,10 +37,10 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.io.scheduler=greedy
-storage.filtered.memorycomponent.max.size=16MB
+storage.filtered.memory.component.max.size=16MB
 
 [cc]
 address = 127.0.0.1
@@ -64,4 +64,4 @@ compiler.ordered.fields=false
 compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf b/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf
index 26db39f861..8fd15f36df 100644
--- a/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf
+++ b/asterixdb/asterix-app/src/main/resources/cc_static_partitioning.conf
@@ -37,10 +37,10 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.io.scheduler=greedy
-storage.filtered.memorycomponent.max.size=16MB
+storage.filtered.memory.component.max.size=16MB
 
 [cc]
 address = 127.0.0.1
@@ -62,6 +62,6 @@ compiler.ordered.fields=false
 compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 storage.compression.block=snappy
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java
index 78c64cc426..4b457f1b32 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/GlobalVirtualBufferCacheTest.java
@@ -266,11 +266,11 @@ public class GlobalVirtualBufferCacheTest {
 
     private void initializeNc() throws Exception {
         List<Pair<IOption, Object>> opts = new ArrayList<>();
-        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 128 * 1024L));
-        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, 1 * 1024));
-        opts.add(Pair.of(Option.STORAGE_BUFFERCACHE_PAGESIZE, 1 * 1024));
-        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
-        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
+        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 128 * 1024L));
+        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, 1 * 1024));
+        opts.add(Pair.of(Option.STORAGE_BUFFER_CACHE_PAGE_SIZE, 1 * 1024));
+        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
+        opts.add(Pair.of(Option.STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE, FILTERED_MEMORY_COMPONENT_SIZE));
 
         nc.setOpts(opts);
 
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java
index 7c1a534984..b7a42232c0 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/LSMFlushRecoveryTest.java
@@ -134,8 +134,8 @@ public class LSMFlushRecoveryTest {
         // right now we've inserted 1000 records to the index, and each record is at least 12 bytes.
         // thus, the memory component size is at least 12KB.
         List<Pair<IOption, Object>> opts = new ArrayList<>();
-        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 20 * 1024 * 1024L));
-        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, 1 * 1024));
+        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 20 * 1024 * 1024L));
+        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, 1 * 1024));
         nc.setOpts(opts);
         initializeNc(false);
         initializeTestCtx();
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
index cc50f2ac2e..0545de826a 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/dataflow/MultiPartitionLSMIndexTest.java
@@ -138,7 +138,7 @@ public class MultiPartitionLSMIndexTest {
                 + File.separator + "resources" + File.separator + "cc-multipart.conf";
         nc = new TestNodeController(configPath, false);
         List<Pair<IOption, Object>> opts = new ArrayList<>();
-        opts.add(Pair.of(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 16 * 1024 * 1024L));
+        opts.add(Pair.of(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 16 * 1024 * 1024L));
         nc.setOpts(opts);
         nc.init();
         ncAppCtx = nc.getAppRuntimeContext();
diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java
index 3d5dad8d45..df5a6abd62 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/runtime/ClusterStateDefaultParameterTest.java
@@ -79,19 +79,19 @@ public class ClusterStateDefaultParameterTest {
         int matchCount = 0;
         String[] rows = result.toString().split(",");
         for (String row : rows) {
-            if (row.contains("storage.buffercache.size")) {
+            if (row.contains("storage.buffer.cache.size")) {
                 Assert.assertTrue(getValue(row) == maxHeap / 4);
                 matchCount++;
             }
-            if (row.contains("storage.memorycomponent.globalbudget")) {
+            if (row.contains("storage.memory.component.global.budget")) {
                 Assert.assertTrue(getValue(row) == maxHeap / 4);
                 matchCount++;
             }
-            if (row.contains("storage.memorycomponent.flush.threshold")) {
+            if (row.contains("storage.memory.component.flush.threshold")) {
                 Assert.assertTrue(getDoubleValue(row) == 0.9d);
                 matchCount++;
             }
-            if (row.contains("storage.filtered.memorycomponent.max.size")) {
+            if (row.contains("storage.filtered.memory.component.max.size")) {
                 Assert.assertTrue(getValue(row) == 0);
                 matchCount++;
             }
diff --git a/asterixdb/asterix-app/src/test/resources/cc-analyze.conf b/asterixdb/asterix-app/src/test/resources/cc-analyze.conf
index 28d0e35e9d..43ac4c26cf 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-analyze.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-analyze.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -56,6 +56,6 @@ log.level = INFO
 compiler.groupmemory=64MB
 # ANALYZE statement needs more memory for sorting
 compiler.sortmemory=128MB
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 compiler.internal.sanitycheck=true
 compiler.ordered.fields=false
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf b/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf
index fc78390376..5fc3eda3f2 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cbotest.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -66,4 +66,4 @@ compiler.ordered.fields=false
 compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf
index 409b99b879..3d012ea201 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=azblob
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl
index 91d87cd342..cf02db0eaa 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-azblob.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=azblob
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf
index d1b4bd2f64..c6fde7ef97 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs-python.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=gs
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
index ee65f3c1c7..2fe535df79 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-gcs.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -64,7 +64,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=gs
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf
index e211291953..65b1adc974 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.conf
@@ -41,8 +41,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl
index edaeb5495f..7c462db9af 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-main.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -63,7 +63,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl
index 0521ff75d4..e9ee66ad33 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-merge.conf.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=8MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=8MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=default
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=2KB
+storage.buffer.cache.page.size=2KB
 storage.column.max.tuple.count=200
 storage.partitioning=static
 cloud.storage.scheme=s3
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf
index 4d4b035b36..bdc55ea282 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=sparse
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl
index 43164d942a..1347c52f30 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage-sparse.conf.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=sparse
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf
index b72660f1e4..330b13497b 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=default
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl
index da9a593a70..9e9cbfcec9 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl
+++ b/asterixdb/asterix-app/src/test/resources/cc-cloud-storage.conf.ftl
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 storage.page.zero.writer=default
 
@@ -65,7 +65,7 @@ compiler.internal.sanitycheck=true
 messaging.frame.size=4096
 messaging.frame.count=512
 cloud.deployment=true
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.partitioning=static
 cloud.storage.scheme=s3
 cloud.storage.bucket=cloud-storage-container
diff --git a/asterixdb/asterix-app/src/test/resources/cc-columnar.conf b/asterixdb/asterix-app/src/test/resources/cc-columnar.conf
index 9be2c16829..6a907ca7f2 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-columnar.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-columnar.conf
@@ -38,8 +38,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -61,5 +61,5 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.format=column
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-main.conf b/asterixdb/asterix-app/src/test/resources/cc-main.conf
index cdc3e6bb0f..47af0b2489 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-main.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-main.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -60,4 +60,4 @@ compiler.textsearchmemory=160KB
 compiler.windowmemory=192KB
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
\ No newline at end of file
+storage.buffer.cache.page.size=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-multipart.conf b/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
index 6c676246fd..f53375f632 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-multipart.conf
@@ -35,8 +35,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -53,4 +53,4 @@ compiler.joinmemory=256KB
 compiler.windowmemory=192KB
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf b/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf
index db4ca20201..e53e6569d5 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-rep-ssl.conf
@@ -43,7 +43,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memorycomponent.globalbudget = 1073741824
+storage.memory.component.global.budget = 1073741824
 
 [cc]
 address = 127.0.0.1
diff --git a/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf b/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf
index 20549a8de8..f6eda438de 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-single-lookup.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -62,4 +62,4 @@ compiler.ordered.fields=false
 compiler.batch.lookup=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf b/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf
index 23071d6501..83b59d0c66 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-single-partition.conf
@@ -30,8 +30,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -53,4 +53,4 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
\ No newline at end of file
+storage.buffer.cache.page.size=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-single.conf b/asterixdb/asterix-app/src/test/resources/cc-single.conf
index 6acd5b5142..e84594e47d 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-single.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-single.conf
@@ -27,8 +27,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -49,4 +49,4 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
index 79a805b751..15fa48f09a 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-small-txn-log-partition.conf
@@ -33,8 +33,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=128MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=128MB
 
 [cc]
 address = 127.0.0.1
@@ -56,4 +56,4 @@ txn.log.partitionsize=2MB
 txn.log.buffer.pagesize=128KB
 txn.log.checkpoint.pollfrequency=2147483647
 txn.log.checkpoint.history=0
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/cc-ssl.conf b/asterixdb/asterix-app/src/test/resources/cc-ssl.conf
index 9c6dc7f87d..28d8f72976 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-ssl.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-ssl.conf
@@ -43,8 +43,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -70,4 +70,4 @@ compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
 ssl.enabled=true
-storage.buffercache.pagesize=32KB
\ No newline at end of file
+storage.buffer.cache.page.size=32KB
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc-storage.conf b/asterixdb/asterix-app/src/test/resources/cc-storage.conf
index f3a39ab8aa..f801f55e0b 100644
--- a/asterixdb/asterix-app/src/test/resources/cc-storage.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc-storage.conf
@@ -33,8 +33,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 
 [cc]
 address = 127.0.0.1
@@ -53,7 +53,7 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
 storage.compression.block=snappy
 txn.log.checkpoint.pollfrequency=10
 txn.dataset.checkpoint.interval=10
\ No newline at end of file
diff --git a/asterixdb/asterix-app/src/test/resources/cc.conf b/asterixdb/asterix-app/src/test/resources/cc.conf
index bdcd537b37..591984bc7c 100644
--- a/asterixdb/asterix-app/src/test/resources/cc.conf
+++ b/asterixdb/asterix-app/src/test/resources/cc.conf
@@ -39,8 +39,8 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.buffercache.size=128MB
-storage.memorycomponent.globalbudget=512MB
+storage.buffer.cache.size=128MB
+storage.memory.component.global.budget=512MB
 storage.max.columns.in.zeroth.segment=800
 
 [cc]
@@ -62,4 +62,4 @@ compiler.windowmemory=192KB
 compiler.ordered.fields=false
 messaging.frame.size=4096
 messaging.frame.count=512
-storage.buffercache.pagesize=32KB
+storage.buffer.cache.page.size=32KB
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
index be8ee4a1a8..ad3c8f0396 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1/cluster_state_1.1.regexadm
@@ -121,14 +121,14 @@
     "ssl\.enabled" : false,
     "ssl\.rmi\.verify\.peer\.identity" : true,
     "ssl\.verify\.peer\.identity" : true,
-    "storage.buffercache.pagesize" : 32768,
+    "storage.buffer.cache.page.size" : 32768,
     "storage.column.free.space.tolerance" : 0.15,
     "storage.column.max.leaf.node.size" : 10485760,
     "storage.column.max.tuple.count" : 15000,
     "storage.compression.block" : "snappy",
     "storage.format" : "row",
     "storage.global.cleanup.timeout" : 600,
-    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
+    "storage.lsm.bloom.filter.false.positive.rate" : 0.01,
     "storage.partitioning" : "dynamic",
     "storage.partitions.count" : 8,
     "txn\.commitprofiler\.enabled" : false,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
index 129be13ab7..d50d2c93db 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_full/cluster_state_1_full.1.regexadm
@@ -121,14 +121,14 @@
     "ssl\.enabled" : false,
     "ssl\.rmi\.verify\.peer\.identity" : true,
     "ssl\.verify\.peer\.identity" : true,
-    "storage.buffercache.pagesize" : 32768,
+    "storage.buffer.cache.page.size" : 32768,
     "storage.column.free.space.tolerance" : 0.15,
     "storage.column.max.leaf.node.size" : 10485760,
     "storage.column.max.tuple.count" : 15000,
     "storage.compression.block" : "snappy",
     "storage.format" : "row",
     "storage.global.cleanup.timeout" : 600,
-    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
+    "storage.lsm.bloom.filter.false.positive.rate" : 0.01,
     "storage.partitioning" : "dynamic",
     "storage.partitions.count" : 8,
     "txn\.commitprofiler\.enabled" : false,
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
index 32a395c018..1fcc8e5abb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/api/cluster_state_1_less/cluster_state_1_less.1.regexadm
@@ -121,14 +121,14 @@
     "ssl\.enabled" : false,
     "ssl\.rmi\.verify\.peer\.identity" : true,
     "ssl\.verify\.peer\.identity" : true,
-    "storage.buffercache.pagesize" : 32768,
+    "storage.buffer.cache.page.size" : 32768,
     "storage.column.free.space.tolerance" : 0.15,
     "storage.column.max.leaf.node.size" : 10485760,
     "storage.column.max.tuple.count" : 15000,
     "storage.compression.block" : "snappy",
     "storage.format" : "row",
     "storage.global.cleanup.timeout" : 600,
-    "storage.lsm.bloomfilter.falsepositiverate" : 0.01,
+    "storage.lsm.bloom.filter.false.positive.rate" : 0.01,
     "storage.partitioning" : "dynamic",
     "storage.partitions.count" : 8,
     "txn\.commitprofiler\.enabled" : false,
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java
index 094ffed6ae..4dae812d6e 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/ConfigConstraints.java
@@ -138,40 +138,39 @@ public final class ConfigConstraints {
     }
 
     private static void checkBufferCache(Function<IOption, Object> config, List<Violation> violations) {
-        Long size = longValue(config, StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE);
-        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_BUFFERCACHE_PAGESIZE);
+        Long size = longValue(config, StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE);
+        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_BUFFER_CACHE_PAGE_SIZE);
         if (size == null || pageSize == null || pageSize <= 0) {
             return;
         }
         // StorageProperties.getBufferCacheNumPages
-        checkPageCount(violations, StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE, size,
-                StorageProperties.Option.STORAGE_BUFFERCACHE_PAGESIZE, pageSize + IBufferCache.RESERVED_HEADER_BYTES,
+        checkPageCount(violations, StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE, size,
+                StorageProperties.Option.STORAGE_BUFFER_CACHE_PAGE_SIZE, pageSize + IBufferCache.RESERVED_HEADER_BYTES,
                 true);
     }
 
     private static void checkMemoryComponents(Function<IOption, Object> config, List<Violation> violations) {
-        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET);
-        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_PAGESIZE);
+        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET);
+        Long pageSize = longValue(config, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE);
         if (budget == null || pageSize == null || pageSize <= 0) {
             return;
         }
         // GlobalVirtualBufferCache: VirtualBufferCache rejects a page budget of 0
-        checkPageCount(violations, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, budget,
-                StorageProperties.Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, pageSize, true);
+        checkPageCount(violations, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, budget,
+                StorageProperties.Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, pageSize, true);
     }
 
     static void checkHeap(Function<IOption, Object> config, List<Violation> violations, long maxHeapBytes) {
-        Long cacheSize = longValue(config, StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE);
-        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET);
+        Long cacheSize = longValue(config, StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE);
+        Long budget = longValue(config, StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET);
         if (cacheSize == null || budget == null) {
             return;
         }
         // StorageProperties.getJobExecutionMemoryBudget fails node startup when nothing is left for jobs
         if (cacheSize + budget >= maxHeapBytes) {
-            violations.add(new Violation(
-                    String.format("%s (%d) plus %s (%d) must be less than the maximum heap (%d)",
-                            StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE.ini(), cacheSize,
-                            StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET.ini(), budget, maxHeapBytes),
+            violations.add(new Violation(String.format("%s (%d) plus %s (%d) must be less than the maximum heap (%d)",
+                    StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE.ini(), cacheSize,
+                    StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET.ini(), budget, maxHeapBytes),
                     true));
         }
     }
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
index 7f193d7085..76069eb071 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/config/StorageProperties.java
@@ -35,6 +35,7 @@ import static org.apache.hyracks.control.common.config.OptionTypes.getRangedLong
 import static org.apache.hyracks.util.StorageUtil.StorageUnit.KILOBYTE;
 import static org.apache.hyracks.util.StorageUtil.StorageUnit.MEGABYTE;
 
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.function.Function;
 
@@ -52,18 +53,18 @@ import org.apache.hyracks.util.StorageUtil;
 public class StorageProperties extends AbstractProperties {
 
     public enum Option implements IOption {
-        STORAGE_BUFFERCACHE_PAGESIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
+        STORAGE_BUFFER_CACHE_PAGE_SIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
         // By default, uses 1/4 of the maximum heap size for read cache, i.e., disk buffer cache.
-        STORAGE_BUFFERCACHE_SIZE(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
-        STORAGE_BUFFERCACHE_MAXOPENFILES(NONNEGATIVE_INTEGER, Integer.MAX_VALUE),
+        STORAGE_BUFFER_CACHE_SIZE(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
+        STORAGE_BUFFER_CACHE_MAX_OPEN_FILES(NONNEGATIVE_INTEGER, Integer.MAX_VALUE),
         STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS(NONNEGATIVE_INTEGER, 0),
-        STORAGE_MEMORYCOMPONENT_GLOBALBUDGET(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
-        STORAGE_MEMORYCOMPONENT_PAGESIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
-        STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS(POSITIVE_INTEGER, 2),
-        STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.9d),
-        STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES(NONNEGATIVE_INTEGER, 0),
-        STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE(LONG_BYTE_UNIT, 0L),
-        STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.01d),
+        STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET(POSITIVE_LONG_BYTE_UNIT, MAX_HEAP_BYTES / 4),
+        STORAGE_MEMORY_COMPONENT_PAGE_SIZE(POSITIVE_INTEGER_BYTE_UNIT, StorageUtil.getIntSizeInBytes(128, KILOBYTE)),
+        STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS(POSITIVE_INTEGER, 2),
+        STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.9d),
+        STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES(NONNEGATIVE_INTEGER, 0),
+        STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE(LONG_BYTE_UNIT, 0L),
+        STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE(getRangedDoubleType(Double.MIN_VALUE, 1.0), 0.01d),
         STORAGE_COMPRESSION_BLOCK(STRING, "snappy"),
         STORAGE_DISK_FORCE_BYTES(LONG_BYTE_UNIT, StorageUtil.getLongSizeInBytes(16, MEGABYTE)),
         STORAGE_IO_SCHEDULER(STRING, "greedy"),
@@ -110,9 +111,9 @@ public class StorageProperties extends AbstractProperties {
         @Override
         public Section section() {
             switch (this) {
-                case STORAGE_BUFFERCACHE_PAGESIZE:
+                case STORAGE_BUFFER_CACHE_PAGE_SIZE:
                 case STORAGE_COMPRESSION_BLOCK:
-                case STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE:
+                case STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE:
                 case STORAGE_GLOBAL_CLEANUP:
                 case STORAGE_GLOBAL_CLEANUP_TIMEOUT:
                 case STORAGE_PARTITIONING:
@@ -129,15 +130,44 @@ public class StorageProperties extends AbstractProperties {
             }
         }
 
+        @Override
+        public List<String> aliases() {
+            // the names these options were released under, before their words were separated
+            switch (this) {
+                case STORAGE_BUFFER_CACHE_PAGE_SIZE:
+                    return List.of("STORAGE_BUFFERCACHE_PAGESIZE");
+                case STORAGE_BUFFER_CACHE_SIZE:
+                    return List.of("STORAGE_BUFFERCACHE_SIZE");
+                case STORAGE_BUFFER_CACHE_MAX_OPEN_FILES:
+                    return List.of("STORAGE_BUFFERCACHE_MAXOPENFILES");
+                case STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET:
+                    return List.of("STORAGE_MEMORYCOMPONENT_GLOBALBUDGET");
+                case STORAGE_MEMORY_COMPONENT_PAGE_SIZE:
+                    return List.of("STORAGE_MEMORYCOMPONENT_PAGESIZE");
+                case STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS:
+                    return List.of("STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS");
+                case STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD:
+                    return List.of("STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD");
+                case STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES:
+                    return List.of("STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES");
+                case STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE:
+                    return List.of("STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE");
+                case STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE:
+                    return List.of("STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE");
+                default:
+                    return List.of();
+            }
+        }
+
         @Override
         public String description() {
             switch (this) {
-                case STORAGE_BUFFERCACHE_PAGESIZE:
+                case STORAGE_BUFFER_CACHE_PAGE_SIZE:
                     return "The page size in bytes for pages in the buffer cache";
-                case STORAGE_BUFFERCACHE_SIZE:
+                case STORAGE_BUFFER_CACHE_SIZE:
                     return "The size of memory allocated to the disk buffer cache.  The value should be a multiple"
                             + " of the buffer cache page size.";
-                case STORAGE_BUFFERCACHE_MAXOPENFILES:
+                case STORAGE_BUFFER_CACHE_MAX_OPEN_FILES:
                     return "The maximum number of open files in the buffer cache";
                 case STORAGE_BUFFER_CACHE_MAX_OPEN_DESCRIPTORS:
                     return "The number of OS file descriptors the buffer cache aims to hold at most. Beyond it, the"
@@ -145,22 +175,22 @@ public class StorageProperties extends AbstractProperties {
                             + " writes are closed, and reopened on their next I/O. 0 means half of the process's"
                             + " maximum number of open files, or unbounded where that limit cannot be determined. Not"
                             + " applied on cloud storage";
-                case STORAGE_MEMORYCOMPONENT_GLOBALBUDGET:
+                case STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET:
                     return "The size of memory allocated to the memory components.  The value should be a multiple "
                             + "of the memory component page size";
-                case STORAGE_MEMORYCOMPONENT_PAGESIZE:
+                case STORAGE_MEMORY_COMPONENT_PAGE_SIZE:
                     return "The page size in bytes for pages allocated to memory components";
-                case STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS:
+                case STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS:
                     return "The number of memory components to be used per lsm index";
-                case STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES:
+                case STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES:
                     return "The maximum number of scheduled flush operations. 0 means that the value will be "
                             + "calculated as the number of partitions";
-                case STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD:
+                case STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD:
                     return "The memory usage threshold when memory components should be flushed";
-                case STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE:
+                case STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE:
                     return "The maximum size of a filtered memory component. 0 means that the memory component "
                             + "does not have a maximum size";
-                case STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE:
+                case STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE:
                     return "The maximum acceptable false positive rate for bloom filters associated with LSM indexes";
                 case STORAGE_COMPRESSION_BLOCK:
                     return "The default compression scheme for the storage";
@@ -259,15 +289,15 @@ public class StorageProperties extends AbstractProperties {
     }
 
     public int getBufferCachePageSize() {
-        return accessor.getInt(Option.STORAGE_BUFFERCACHE_PAGESIZE);
+        return accessor.getInt(Option.STORAGE_BUFFER_CACHE_PAGE_SIZE);
     }
 
     public long getBufferCacheSize() {
-        return accessor.getLong(Option.STORAGE_BUFFERCACHE_SIZE);
+        return accessor.getLong(Option.STORAGE_BUFFER_CACHE_SIZE);
     }
 
     public int getBufferCacheMaxOpenFiles() {
-        return accessor.getInt(Option.STORAGE_BUFFERCACHE_MAXOPENFILES);
+        return accessor.getInt(Option.STORAGE_BUFFER_CACHE_MAX_OPEN_FILES);
     }
 
     /**
@@ -285,28 +315,28 @@ public class StorageProperties extends AbstractProperties {
     }
 
     public int getMemoryComponentPageSize() {
-        return accessor.getInt(Option.STORAGE_MEMORYCOMPONENT_PAGESIZE);
+        return accessor.getInt(Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE);
     }
 
     public double getMemoryComponentFlushThreshold() {
-        return accessor.getDouble(Option.STORAGE_MEMORYCOMPONENT_FLUSH_THRESHOLD);
+        return accessor.getDouble(Option.STORAGE_MEMORY_COMPONENT_FLUSH_THRESHOLD);
     }
 
     public int getFilteredMemoryComponentMaxNumPages() {
-        return (int) (accessor.getLong(Option.STORAGE_FILTERED_MEMORYCOMPONENT_MAX_SIZE)
+        return (int) (accessor.getLong(Option.STORAGE_FILTERED_MEMORY_COMPONENT_MAX_SIZE)
                 / getMemoryComponentPageSize());
     }
 
     public int getMemoryComponentsNum() {
-        return accessor.getInt(Option.STORAGE_MEMORYCOMPONENT_NUMCOMPONENTS);
+        return accessor.getInt(Option.STORAGE_MEMORY_COMPONENT_NUM_COMPONENTS);
     }
 
     public long getMemoryComponentGlobalBudget() {
-        return accessor.getLong(Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET);
+        return accessor.getLong(Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET);
     }
 
     public double getBloomFilterFalsePositiveRate() {
-        return accessor.getDouble(Option.STORAGE_LSM_BLOOMFILTER_FALSEPOSITIVERATE);
+        return accessor.getDouble(Option.STORAGE_LSM_BLOOM_FILTER_FALSE_POSITIVE_RATE);
     }
 
     public int getMaxSampleLeafAttempts() {
@@ -349,7 +379,7 @@ public class StorageProperties extends AbstractProperties {
     }
 
     public int getMaxScheduledFlushes() {
-        return accessor.getInt(Option.STORAGE_MEMORYCOMPONENT_MAX_SCHEDULED_FLUSHES);
+        return accessor.getInt(Option.STORAGE_MEMORY_COMPONENT_MAX_SCHEDULED_FLUSHES);
     }
 
     public long getJobExecutionMemoryBudget(INcApplicationContext runtimeContext) {
diff --git a/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java b/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java
index f5aff58505..88887ed338 100644
--- a/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java
+++ b/asterixdb/asterix-common/src/test/java/org/apache/asterix/common/config/ConfigConstraintsTest.java
@@ -42,10 +42,10 @@ public class ConfigConstraintsTest {
 
     @Before
     public void setUp() {
-        config.put(StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE, 32 * MB);
-        config.put(StorageProperties.Option.STORAGE_BUFFERCACHE_PAGESIZE, (int) (128 * KB));
-        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 32 * MB);
-        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_PAGESIZE, (int) (128 * KB));
+        config.put(StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE, 32 * MB);
+        config.put(StorageProperties.Option.STORAGE_BUFFER_CACHE_PAGE_SIZE, (int) (128 * KB));
+        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 32 * MB);
+        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_PAGE_SIZE, (int) (128 * KB));
         config.put(TransactionProperties.Option.TXN_LOG_BUFFER_PAGESIZE, (int) (4 * MB));
         config.put(TransactionProperties.Option.TXN_LOG_BUFFER_NUMPAGES, 8);
         config.put(TransactionProperties.Option.TXN_LOG_PARTITIONSIZE, 256 * MB);
@@ -68,17 +68,17 @@ public class ConfigConstraintsTest {
 
     @Test
     public void memoryComponentBudgetBelowOnePageIsFatal() {
-        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 64 * KB);
+        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 64 * KB);
         List<ConfigConstraints.Violation> violations = ConfigConstraints.check(config::get);
         assertEquals(1, violations.size());
         assertTrue(violations.get(0).isFatalAtStartup());
         assertTrue(violations.get(0).getMessage(),
-                violations.get(0).getMessage().contains("storage.memorycomponent.globalbudget"));
+                violations.get(0).getMessage().contains("storage.memory.component.global.budget"));
     }
 
     @Test
     public void bufferCacheBelowOnePageIsFatal() {
-        config.put(StorageProperties.Option.STORAGE_BUFFERCACHE_SIZE, 128 * KB);
+        config.put(StorageProperties.Option.STORAGE_BUFFER_CACHE_SIZE, 128 * KB);
         List<ConfigConstraints.Violation> violations = ConfigConstraints.check(config::get);
         assertEquals(1, violations.size());
         assertTrue(violations.get(0).isFatalAtStartup());
@@ -153,22 +153,22 @@ public class ConfigConstraintsTest {
     @Test
     public void validatorRejectsViolationsTheChangeIntroduces() {
         Map<IOption, Object> proposed = new HashMap<>(config);
-        proposed.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 0L);
+        proposed.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 0L);
         proposed.put(CompilerProperties.Option.COMPILER_SORTMEMORY, KB);
         IConfigValidator validator = (option, value) -> {
         };
         IllegalArgumentException e = assertThrows(IllegalArgumentException.class,
                 () -> validator.validateChange(config::get, proposed::get));
-        assertTrue(e.getMessage(), e.getMessage().contains("storage.memorycomponent.globalbudget"));
+        assertTrue(e.getMessage(), e.getMessage().contains("storage.memory.component.global.budget"));
         assertTrue(e.getMessage(), e.getMessage().contains("compiler.sortmemory"));
     }
 
     @Test
     public void validatorAllowsCorrectingOneOfSeveralViolations() {
-        config.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 0L);
+        config.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 0L);
         config.put(CompilerProperties.Option.COMPILER_SORTMEMORY, KB);
         Map<IOption, Object> proposed = new HashMap<>(config);
-        proposed.put(StorageProperties.Option.STORAGE_MEMORYCOMPONENT_GLOBALBUDGET, 32 * MB);
+        proposed.put(StorageProperties.Option.STORAGE_MEMORY_COMPONENT_GLOBAL_BUDGET, 32 * MB);
         IConfigValidator validator = (option, value) -> {
         };
         validator.validateChange(config::get, proposed::get);
diff --git a/asterixdb/asterix-doc/src/site/markdown/ncservice.md b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
index 4ce41ec39b..86999db92f 100644
--- a/asterixdb/asterix-doc/src/site/markdown/ncservice.md
+++ b/asterixdb/asterix-doc/src/site/markdown/ncservice.md
@@ -325,13 +325,13 @@ The following parameters for slave processes, under "[nc]" sections.
 |   nc    | result.sweep.threshold                    | The duration within which an instance of the result cleanup should be invoked in milliseconds | 60000 |
 |   nc    | result.ttl                                | Limits the amount of time results for asynchronous jobs should be retained by the system in milliseconds | 86400000 |
 |   nc    | storage.buffer.cache.max.open.descriptors | The number of OS file descriptors the buffer cache aims to hold at most. Beyond it, the descriptors of the least recently used files with no I/O in progress and no unforced writes are closed, and reopened on their next I/O. 0 means half of the process's maximum number of open files, or unbounded where that limit cannot be determined. Not applied on cloud storage | 0 |
-|   nc    | storage.buffercache.maxopenfiles          | The maximum number of open files in the buffer cache | 2147483647 |
-|   nc    | storage.buffercache.pagesize              | The page size in bytes for pages in the buffer cache | 131072 (128 kB) |
-|   nc    | storage.buffercache.size                  | The size of memory allocated to the disk buffer cache.  The value should be a multiple of the buffer cache page size. | 1/4 of the JVM allocated memory |
-|   nc    | storage.lsm.bloomfilter.falsepositiverate | The maximum acceptable false positive rate for bloom filters associated with LSM indexes | 0.01 |
-|   nc    | storage.memorycomponent.globalbudget      | The size of memory allocated to the memory components.  The value should be a multiple of the memory component page size | 1/4 of the JVM allocated memory |
-|   nc    | storage.memorycomponent.numcomponents     | The number of memory components to be used per lsm index | 2 |
-|   nc    | storage.memorycomponent.pagesize          | The page size in bytes for pages allocated to memory components | 131072 (128 kB) |
+|   nc    | storage.buffer.cache.max.open.files       | The maximum number of open files in the buffer cache | 2147483647 |
+|   nc    | storage.buffer.cache.page.size            | The page size in bytes for pages in the buffer cache | 131072 (128 kB) |
+|   nc    | storage.buffer.cache.size                 | The size of memory allocated to the disk buffer cache.  The value should be a multiple of the buffer cache page size. | 1/4 of the JVM allocated memory |
+|   nc    | storage.lsm.bloom.filter.false.positive.rate | The maximum acceptable false positive rate for bloom filters associated with LSM indexes | 0.01 |
+|   nc    | storage.memory.component.global.budget    | The size of memory allocated to the memory components.  The value should be a multiple of the memory component page size | 1/4 of the JVM allocated memory |
+|   nc    | storage.memory.component.num.components   | The number of memory components to be used per lsm index | 2 |
+|   nc    | storage.memory.component.page.size        | The page size in bytes for pages allocated to memory components | 131072 (128 kB) |
 |   nc    | storage.metadata.memorycomponent.numpages | The number of pages to allocate for a metadata memory component | 8 |
 |   nc    | txn.log.dir                               | The directory where transaction logs should be stored | ${java.io.tmpdir}/asterixdb/txn-log |
 
diff --git a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
index 12fb27a484..d7a1c00cd1 100644
--- a/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/NCServiceExecutionIT/cc.conf
@@ -36,7 +36,7 @@ jvm.args=-Xmx5g -Dfile.encoding=us-ascii
 address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
-storage.memorycomponent.globalbudget = 1073741824
+storage.memory.component.global.budget = 1073741824
 result.sweep.threshold=1000
 
 [cc]
diff --git a/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf b/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
index a5a437a477..f6af7ecf9f 100644
--- a/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/NcLifecycleIT/cc.conf
@@ -36,7 +36,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memorycomponent.globalbudget = 1073741824
+storage.memory.component.global.budget = 1073741824
 
 [cc]
 address = 127.0.0.1
diff --git a/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
index bef0a3cbf7..1edadb05dd 100644
--- a/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
+++ b/asterixdb/asterix-server/src/test/resources/ReplicationIT/cc.conf
@@ -37,7 +37,7 @@ address=127.0.0.1
 command=asterixnc
 app.class=org.apache.asterix.hyracks.bootstrap.NCApplication
 jvm.args=-Xmx4096m -Dnode.Resolver="org.apache.asterix.external.util.IdentitiyResolverFactory"
-storage.memorycomponent.globalbudget = 1073741824
+storage.memory.component.global.budget = 1073741824
 
 [cc]
 address = 127.0.0.1


(asterixdb) 05/13: [ASTERIXDB-3947][CONF] Support aliases for option names

Posted by mb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git

commit 97c82bf7be6c6ce1a1cc72b92bb6132ba629d10b
Author: Michael Blow <mi...@couchbase.com>
AuthorDate: Wed Oct 7 18:25:19 2026 -0400

    [ASTERIXDB-3947][CONF] Support aliases for option names
    
    - user model changes: no
    - storage format changes: no
    - interface changes: yes
    
    Details: An option's names are derived from its enum constant, so
    renaming an option breaks every configuration that uses the old name.
    Add IOption.aliases(): former names, in enum-constant form, that are
    still accepted on input but never emitted.
    
    ConfigManager resolves an alias to its option when parsing the ini file
    and the command line, and in lookupOption(). Using an alias logs a
    deprecation warning once per process; setting an option by both its name
    and an alias in the same ini section or command line is rejected.
    Registering an alias that collides with another option's name or alias
    fails.
    
    Ext-ref: MB-74476
    Generated-by: Claude Opus 5.5 <no...@anthropic.com>
    Change-Id: Id1a4cb60e2953a22c5da22a6e012cbb1d718f934
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/22017
    Reviewed-by: Michael Blow <mb...@apache.org>
    Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Hussain Altowileb <hu...@gmail.com>
---
 .../org/apache/hyracks/api/config/IOption.java     |  22 ++++
 .../control/common/config/Args4jOption.java        |   2 +-
 .../control/common/config/ConfigManager.java       |  78 +++++++++++-
 .../control/common/config/ConfigManagerTest.java   | 132 +++++++++++++++++++++
 4 files changed, 229 insertions(+), 5 deletions(-)

diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java
index 0b75436877..75b90eed95 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/config/IOption.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hyracks.api.config;
 
+import java.util.List;
 import java.util.function.Function;
 
 import org.apache.hyracks.util.LogRedactionUtil;
@@ -79,6 +80,27 @@ public interface IOption {
         return StringUtil.toCamelCase(name());
     }
 
+    /**
+     * @return former names of this option, in the same form as {@link #name()}, that are still accepted wherever an
+     *         option is set by name (ini, command line, lookup by name), but are never emitted. Lets an option be
+     *         renamed without breaking configurations that use its old name.
+     */
+    default List<String> aliases() {
+        return List.of();
+    }
+
+    default List<String> iniAliases() {
+        return aliases().stream().map(IOption::toIni).toList();
+    }
+
+    default List<String> cmdlineAliases() {
+        return aliases().stream().map(alias -> "-" + alias.toLowerCase().replace("_", "-")).toList();
+    }
+
+    default List<String> camelCaseAliases() {
+        return aliases().stream().map(StringUtil::toCamelCase).toList();
+    }
+
     default String toIniString() {
         return "[" + section().sectionName() + "] " + ini();
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java
index c904d0bc8b..1663990245 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/Args4jOption.java
@@ -46,7 +46,7 @@ class Args4jOption implements Option {
 
     @Override
     public String[] aliases() {
-        return new String[0];
+        return option.cmdlineAliases().toArray(new String[0]);
     }
 
     @Override
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
index 894382f16b..f8eb74124b 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/config/ConfigManager.java
@@ -39,6 +39,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.function.BiConsumer;
 import java.util.function.Consumer;
 import java.util.function.Function;
@@ -72,6 +73,7 @@ public class ConfigManager implements IConfigManager, Serializable {
 
     private static final long serialVersionUID = 1L;
     private static final Logger LOGGER = LogManager.getLogger();
+    private static final Set<String> WARNED_ALIASES = ConcurrentHashMap.newKeySet();
 
     private HashSet<IOption> registeredOptions = new HashSet<>();
     @SuppressWarnings("squid:S1948") // HashMap is serializable, and therefore so is its synchronized map
@@ -82,6 +84,7 @@ public class ConfigManager implements IConfigManager, Serializable {
     private Map<IOption, Object> configurationMap =
             Collections.synchronizedMap(new CompositeMap<>(definedMap, defaultMap, new NoOpMapMutator()));
     private EnumMap<Section, Map<String, IOption>> sectionMap = new EnumMap<>(Section.class);
+    private EnumMap<Section, Map<String, IOption>> aliasMap = new EnumMap<>(Section.class);
     @SuppressWarnings("squid:S1948") // TreeMap is serializable, and therefore so is its synchronized map
     private Map<String, Map<IOption, Object>> nodeSpecificDefinedMap = Collections.synchronizedMap(new TreeMap<>());
     @SuppressWarnings("squid:S1948") // TreeMap is serializable, and therefore so is its synchronized map
@@ -151,6 +154,11 @@ public class ConfigManager implements IConfigManager, Serializable {
             }
             LOGGER.trace("registering option: {}", option::toIniString);
             Map<String, IOption> optionMap = sectionMap.computeIfAbsent(option.section(), section -> new HashMap<>());
+            IOption aliased = aliasMap.getOrDefault(option.section(), Collections.emptyMap()).get(option.ini());
+            if (aliased != null) {
+                throw new IllegalStateException(
+                        "Option " + option.toIniString() + " collides with an alias of " + aliased.toIniString());
+            }
             IOption prev = optionMap.put(option.ini(), option);
             if (prev != null) {
                 if (prev != option) {
@@ -158,6 +166,7 @@ public class ConfigManager implements IConfigManager, Serializable {
                             + option.toIniString() + ": " + Arrays.asList(option.getClass(), prev.getClass()));
                 }
             } else {
+                registerAliases(option, optionMap);
                 registeredOptions.add(option);
                 optionSetters.put(option, (node, value, isDefault) -> correctedMap(node, isDefault).put(option, value));
                 if (LOGGER.isDebugEnabled()) {
@@ -175,6 +184,38 @@ public class ConfigManager implements IConfigManager, Serializable {
         }
     }
 
+    private void registerAliases(IOption option, Map<String, IOption> optionMap) {
+        Map<String, IOption> aliases = aliasMap.computeIfAbsent(option.section(), section -> new HashMap<>());
+        for (String alias : option.iniAliases()) {
+            IOption existing = optionMap.get(alias);
+            if (existing == null) {
+                existing = aliases.putIfAbsent(alias, option);
+            }
+            if (existing != null) {
+                throw new IllegalStateException("Alias [" + option.section().sectionName() + "] " + alias + " of "
+                        + option.toIniString() + " collides with " + existing.toIniString());
+            }
+        }
+    }
+
+    /**
+     * @return the option that {@code name} is an alias of in {@code section}, or null if it is not one
+     */
+    private IOption resolveAlias(Section section, String name) {
+        Map<String, IOption> aliases = section == null ? null : aliasMap.get(section);
+        IOption option = aliases == null ? null : aliases.get(name);
+        if (option != null) {
+            warnAlias("[" + section.sectionName() + "] " + name, option.toIniString());
+        }
+        return option;
+    }
+
+    private static void warnAlias(String alias, String canonical) {
+        if (WARNED_ALIASES.add(alias)) {
+            LOGGER.warn("option {} is deprecated; use {} instead", alias, canonical);
+        }
+    }
+
     private Map<IOption, Object> correctedMap(String node, boolean isDefault) {
         if (node == null) {
             return isDefault ? defaultMap : definedMap;
@@ -226,8 +267,9 @@ public class ConfigManager implements IConfigManager, Serializable {
     }
 
     public IOption lookupOption(String section, String key) {
-        Map<String, IOption> map = getSectionOptionMap(Section.parseSectionName(section));
-        return map == null ? null : map.get(key);
+        Section parsedSection = Section.parseSectionName(section);
+        IOption option = getSectionOptionMap(parsedSection).get(key);
+        return option != null ? option : resolveAlias(parsedSection, key);
     }
 
     public void processConfig() throws CmdLineException, IOException {
@@ -283,6 +325,7 @@ public class ConfigManager implements IConfigManager, Serializable {
             }
         }
         commandLineOptions.sort(Comparator.comparing(IOption::cmdline));
+        checkCommandLineAliases(cmdLineParser, commandLineOptions);
 
         commandLineOptions.forEach(option -> cmdLineParser.addOption(new Args4jSetter(option, setAction, false),
                 new Args4jOption(option, this, option.type().targetType())));
@@ -316,6 +359,26 @@ public class ConfigManager implements IConfigManager, Serializable {
         return appArgs;
     }
 
+    private void checkCommandLineAliases(CmdLineParser cmdLineParser, List<IOption> options) throws CmdLineException {
+        if (args == null) {
+            return;
+        }
+        Set<String> given = Stream.of(args).map(arg -> arg.split("=", 2)[0]).collect(Collectors.toSet());
+        for (IOption option : options) {
+            for (String alias : option.cmdlineAliases()) {
+                if (!given.contains(alias)) {
+                    continue;
+                }
+                if (given.contains(option.cmdline())) {
+                    throw new CmdLineException(cmdLineParser,
+                            "both " + option.cmdline() + " and its deprecated alias " + alias + " were specified",
+                            null);
+                }
+                warnAlias(alias, option.cmdline());
+            }
+        }
+    }
+
     private void parseIni() throws IOException {
         Ini ini = null;
         for (IOption option : iniPointerOptions) {
@@ -350,12 +413,19 @@ public class ConfigManager implements IConfigManager, Serializable {
                 throw new HyracksException("Unknown section in ini: " + section.getName());
             }
             Map<String, IOption> optionMap = getSectionOptionMap(rootSection);
+            Map<IOption, String> setBy = new HashMap<>();
             for (String name : section.keySet()) {
-                final IOption option = optionMap == null ? null : optionMap.get(name);
+                final IOption canonical = optionMap.get(name);
+                final IOption option = canonical != null ? canonical : resolveAlias(rootSection, name);
                 if (option == null) {
                     handleUnknownOption(section, name);
                     return;
                 }
+                final String otherName = setBy.put(option, name);
+                if (otherName != null) {
+                    throw new HyracksException("Both " + otherName + " and " + name + " set " + option.toIniString()
+                            + " in [" + section.getName() + "]; remove the deprecated one");
+                }
                 final List<String> values = section.getAll(name);
                 if (values.size() <= 1) {
                     LOGGER.debug("setting " + option.toIniString() + " to " + values.get(0));
@@ -378,7 +448,7 @@ public class ConfigManager implements IConfigManager, Serializable {
     private void handleUnknownOption(Profile.Section section, String name) throws HyracksException {
         Set<String> matches = new HashSet<>();
         for (IOption registeredOption : registeredOptions) {
-            if (registeredOption.ini().equals(name)) {
+            if (registeredOption.ini().equals(name) || registeredOption.iniAliases().contains(name)) {
                 matches.add(registeredOption.section().sectionName());
             }
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java
index 8bc1259b1d..1a4e30ae3e 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/test/java/org/apache/hyracks/control/common/config/ConfigManagerTest.java
@@ -18,6 +18,9 @@
  */
 package org.apache.hyracks.control.common.config;
 
+import java.io.File;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
@@ -31,8 +34,14 @@ import org.apache.commons.lang3.mutable.MutableObject;
 import org.apache.hyracks.api.config.IOption;
 import org.apache.hyracks.api.config.IOptionType;
 import org.apache.hyracks.api.config.Section;
+import org.apache.hyracks.api.exceptions.HyracksException;
+import org.apache.hyracks.control.common.controllers.ControllerConfig;
 import org.apache.hyracks.util.Span;
+import org.junit.Assert;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.kohsuke.args4j.CmdLineException;
 
 public class ConfigManagerTest {
 
@@ -64,8 +73,70 @@ public class ConfigManagerTest {
         }
     }
 
+    public enum AliasedOption implements IOption {
+        RENAMED_OPTION(List.of("RENAMEDOPTION"));
+
+        private final List<String> aliases;
+
+        AliasedOption(List<String> aliases) {
+            this.aliases = aliases;
+        }
+
+        @Override
+        public Section section() {
+            return Section.COMMON;
+        }
+
+        @Override
+        public String description() {
+            return "Description for " + name();
+        }
+
+        @Override
+        public IOptionType type() {
+            return OptionTypes.INTEGER;
+        }
+
+        @Override
+        public Object defaultValue() {
+            return 0;
+        }
+
+        @Override
+        public List<String> aliases() {
+            return aliases;
+        }
+    }
+
+    public enum CollidingOption implements IOption {
+        RENAMEDOPTION;
+
+        @Override
+        public Section section() {
+            return Section.COMMON;
+        }
+
+        @Override
+        public String description() {
+            return "Description for " + name();
+        }
+
+        @Override
+        public IOptionType type() {
+            return OptionTypes.INTEGER;
+        }
+
+        @Override
+        public Object defaultValue() {
+            return 0;
+        }
+    }
+
     private static final Random RANDOM = new Random();
 
+    @Rule
+    public TemporaryFolder tempFolder = new TemporaryFolder();
+
     @Test
     public void testConcurrentUpdates() throws Exception {
         ConfigManager configManager = new ConfigManager();
@@ -105,6 +176,67 @@ public class ConfigManagerTest {
         }
     }
 
+    @Test
+    public void testIniAlias() throws Exception {
+        ConfigManager configManager = aliasedConfigManager(iniArgs("renamedoption = 7"));
+        configManager.processConfig();
+        Assert.assertEquals(7, configManager.get(AliasedOption.RENAMED_OPTION));
+    }
+
+    @Test
+    public void testIniAliasWithCanonicalNameRejected() throws Exception {
+        ConfigManager configManager = aliasedConfigManager(iniArgs("renamedoption = 7", "renamed.option = 8"));
+        HyracksException e = Assert.assertThrows(HyracksException.class, configManager::processConfig);
+        Assert.assertTrue(e.getMessage(), e.getMessage().contains("renamed.option"));
+    }
+
+    @Test
+    public void testCommandLineAlias() throws Exception {
+        ConfigManager configManager = aliasedConfigManager(new String[] { "-renamedoption", "5" });
+        configManager.processConfig();
+        Assert.assertEquals(5, configManager.get(AliasedOption.RENAMED_OPTION));
+    }
+
+    @Test
+    public void testCommandLineAliasWithCanonicalNameRejected() {
+        ConfigManager configManager =
+                aliasedConfigManager(new String[] { "-renamedoption", "5", "-renamed-option", "6" });
+        Assert.assertThrows(CmdLineException.class, configManager::processConfig);
+    }
+
+    @Test
+    public void testLookupByAlias() {
+        ConfigManager configManager = aliasedConfigManager(null);
+        Assert.assertEquals(AliasedOption.RENAMED_OPTION, configManager.lookupOption("common", "renamedoption"));
+        Assert.assertEquals(AliasedOption.RENAMED_OPTION, configManager.lookupOption("common", "renamed.option"));
+        Assert.assertNull(configManager.lookupOption("nc", "renamedoption"));
+    }
+
+    @Test
+    public void testAliasCollidingWithOptionRejected() {
+        ConfigManager aliasFirst = new ConfigManager();
+        aliasFirst.register(AliasedOption.class);
+        Assert.assertThrows(IllegalStateException.class, () -> aliasFirst.register(CollidingOption.class));
+        ConfigManager optionFirst = new ConfigManager();
+        optionFirst.register(CollidingOption.class);
+        Assert.assertThrows(IllegalStateException.class, () -> optionFirst.register(AliasedOption.class));
+    }
+
+    private String[] iniArgs(String... lines) throws Exception {
+        File ini = tempFolder.newFile("aliases.ini");
+        Files.writeString(ini.toPath(), "[common]\n" + String.join("\n", lines) + "\n", StandardCharsets.UTF_8);
+        return new String[] { "-config-file", ini.getAbsolutePath() };
+    }
+
+    private static ConfigManager aliasedConfigManager(String[] args) {
+        ConfigManager configManager = new ConfigManager(args);
+        configManager.addIniParamOptions(ControllerConfig.Option.CONFIG_FILE);
+        configManager.addCmdLineSections(Section.COMMON);
+        configManager.register(ControllerConfig.Option.class);
+        configManager.register(AliasedOption.class);
+        return configManager;
+    }
+
     private static Option randomOption() {
         return Option.values()[RANDOM.nextInt(Option.values().length)];
     }