AbstractCloudBeanPostprocessor 内の Cloud Foundry プラグイン ソース コードを調べたところ、問題の原因がわかりました。コンパス接続を設定する方法は、それが RAM インデックスであるかどうかをチェックせず、やみくもにディスク上の場所に設定します。
/**
* Update the location of the Searchable Lucene index.
* @param beanFactory the Spring bean factory
* @param appConfig the application config
*/
protected void fixCompass(ConfigurableListableBeanFactory beanFactory, ConfigObject appConfig) {
def compassBean = beanFactory.getBeanDefinition('compass')
String indexLocation = getCompassIndexRootLocation(appConfig) + '/searchable-index'
appConfig.searchable.compassConnection = indexLocation
compassBean.propertyValues.addPropertyValue 'compassConnection', indexLocation
log.debug "Updated Compass connection details: $indexLocation"
}
これはRAMインデックスの存在を実際にチェックし、ディスクの場所にのみ設定する必要があると思います。考えられる回避策の 1 つは、独自の BeanDefinitionRegistryPostProcessor を作成し、クラウド ファウンドリ プラグインの動作を元に戻すことです。