return false;
}
- return (bool)$db->affectedRows();
+ $success = (bool)$db->affectedRows();
+ if ( $this->fieldHasFlags( $flags, self::WRITE_SYNC ) ) {
+ $success = $this->waitForReplication() && $success;
+ }
+
+ return $success;
}
protected function doDeleteMulti( array $keys, $flags = 0 ) {
return $newCount;
}
- public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) {
- $ok = $this->mergeViaCas( $key, $callback, $exptime, $attempts, $flags );
- if ( $this->fieldHasFlags( $flags, self::WRITE_SYNC ) ) {
- $ok = $this->waitForReplication() && $ok;
- }
-
- return $ok;
- }
-
public function changeTTLMulti( array $keys, $exptime, $flags = 0 ) {
return $this->modifyMulti(
array_fill_keys( $keys, null ),