phabricator 报如下错误
Replicating Master
Database host “[数据库地址]” is configured as a master, but is replicating another host. This is dangerous and can mangle or destroy data. Only replicas should be replicating. Stop replication on the host or reconfigure Phabricator.
然后发现原因是RDS自动做了主从备份,据说还是双向,而且无法关闭。
只能从程序下手了,搜索代码发现在
switch ($ref->getReplicaStatus()) {
case PhabricatorDatabaseRef::REPLICATION_MASTER_REPLICA:
break;<----新增的
$message = pht(
'Database host "%s" is configured as a master, but is replicating '.
'another host. This is dangerous and can mangle or destroy data. '.
'Only replicas should be replicating. Stop replication on the '.
'host or reconfigure Phabricator.',
$ref->getRefKey());
https://secure.phabricator.com/source/phabricator/browse/master/src/applications/config/check/PhabricatorDatabaseSetupCheck.php;326d5bf8004ece51fbb44146766f5ddf765f1159
这个文件的174行左右判断验证了
然后我在case后直接写了个break,绕过了验证,反正是可以用了