src/server/service/config-manager.js
/**
   * update configs in the same namespace
   *
   * Specified values are encoded by convertInsertValue.
   * In it, an empty string is converted to null that indicates a config is not set.
   *
   * For example:
   * ```
   *  updateConfigsInTheSameNamespace(
   *   'some namespace',
   *   {
   *    'some key 1': 'value 1',
   *    'some key 2': 'value 2',
   *    ...
   *   }
   *  );
   * ```
   */
update configs in the same namespace
Specified values are encoded by convertInsertValue.
In it, an empty string is converted to null that indicates a config is not set.


update configs in the same namespace Specified values are encoded by convertInsertValue . In it an empty string is converted to null that indicates a config is not set .
async updateConfigsInTheSameNamespace(namespace, configs) {
    const queries = [];
    for (const key of Object.keys(configs)) {
      queries.push({
        updateOne: {
          filter: { ns: namespace, key },
          update: { ns: namespace, key, value: this.convertInsertValue(configs[key]) },
          upsert: true,
        },
      });
    }
    await this.configModel.bulkWrite(queries);
    await this.loadConfigs();
    this.reloadConfigKeys();
  }
async updateConfigsInTheSameNamespace ( namespace , configs ) { const queries = [ ] ; for ( const key of Object . keys ( configs ) ) { queries . push ( { updateOne : { filter : { ns : namespace , key } , update : { ns : namespace , key , value : this . convertInsertValue ( configs [ key ] ) } , upsert : true , } , } ) ; } await this . configModel . bulkWrite ( queries ) ; await this . loadConfigs ( ) ; this . reloadConfigKeys ( ) ; }
update configs in the same namespace
 Specified values are encoded by convertInsertValue.
update configs in the same namespace Specified values are encoded by convertInsertValue .