提交 56d84226 编写于 作者: M Megrez Lu

locally register schema

上级 ce7fc5c7
......@@ -56,7 +56,16 @@ public class BanyanDBIndexInstaller extends ModelInstaller {
}
// then check entity schema
return metadata.findRemoteSchema(c).isPresent();
if (metadata.findRemoteSchema(c).isPresent()) {
if (model.isTimeSeries() && model.isRecord()) { // stream
MetadataRegistry.INSTANCE.registerStreamModel(model, config, configService);
} else if (model.isTimeSeries() && !model.isRecord()) { // measure
MetadataRegistry.INSTANCE.registerMeasureModel(model, config, configService);
}
return true;
}
throw new IllegalStateException("inconsistent state");
} catch (BanyanDBException ex) {
throw new StorageException("fail to check existence", ex);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册