public boolean tryEnableBinlog(Database db, long tableId, long binlogTtL, long binlogMaxSize) {
        // pass properties not binlogConfig is for
        // unify the logic of alter table manaul and alter table of mv trigger
        HashMap<String, String> properties = new HashMap<>();
        properties.put(PropertyAnalyzer.PROPERTIES_BINLOG_ENABLE, "true");
        if (!(binlogTtL == INVALID)) {
            properties.put(PropertyAnalyzer.PROPERTIES_BINLOG_TTL, String.valueOf(binlogTtL));
        }
        if (!(binlogMaxSize == INVALID)) {
            properties.put(PropertyAnalyzer.PROPERTIES_BINLOG_MAX_SIZE, String.valueOf(binlogMaxSize));
        }

        SchemaChangeHandler schemaChangeHandler = GlobalStateMgr.getCurrentState().getSchemaChangeHandler();
        return schemaChangeHandler.updateBinlogConfigMeta(db, tableId, properties, TTabletMetaType.BINLOG_CONFIG);
    }
@Test
    public void testTryEnableBinlog() {
        Database db = GlobalStateMgr.getCurrentState().getDb("test");
        OlapTable table = (OlapTable) db.getTable("binlog_test");
        boolean result = binlogManager.tryEnableBinlog(db, table.getId(), 200L, -1L);
        Assert.assertTrue(result);
        Assert.assertEquals(1, table.getBinlogVersion());
        Assert.assertEquals(200, table.getCurBinlogConfig().getBinlogTtlSecond());
        Assert.assertEquals(100,
                table.getCurBinlogConfig().getBinlogMaxSize());

    }