private void defineTopNAggregation(MetadataRegistry.Schema schema, BanyanDBClient client) throws BanyanDBException {
        if (schema.getTopNSpec() == null) {
            if (schema.getMetadata().getKind() == MetadataRegistry.Kind.MEASURE) {
                log.debug("skip null TopN Schema for [{}]", schema.getMetadata().name());
            }
            return;
        }
        try {
            client.define(schema.getTopNSpec());
            log.info("installed TopN schema for measure {}", schema.getMetadata().name());
        } catch (BanyanDBException ex) {
            if (ex.getStatus().equals(Status.Code.ALREADY_EXISTS)) {
                log.info("TopNAggregation {} already created by another OAP node", schema.getTopNSpec());
            } else {
                throw ex;
            }
        }
    }
Update the schema from the banyanDB server side for the java client cache
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBIndexInstaller.java