diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2017-06-05 18:16:45 -0400 |
---|---|---|
committer | Nick Vatamaniuc <vatamane@apache.org> | 2017-06-05 18:16:45 -0400 |
commit | b3acd570bbe7fe8527170b62fe69b15302ff5683 (patch) | |
tree | 1b37378fc5bf5a008a5236d8b193a211db55903e | |
parent | 18f5226006c9422a89c7221a8b2cf250107a2e3b (diff) | |
download | couchdb-COUCHDB-3288-mixed-cluster-upgrade-mixed-cluster-attachments.tar.gz |
Handle attachments downgrades in a mixed cluster environmentCOUCHDB-3288-mixed-cluster-upgrade-mixed-cluster-attachments
Previously attachment uploading from a PSE to non-PSE node would
fail as the attachment streaming API changed between version.
This commit handles downgrading attachment streams from PSE nodes so that
non-PSE nodes can write them.
-rw-r--r-- | src/couch/src/couch_att.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/couch/src/couch_att.erl b/src/couch/src/couch_att.erl index 9d38cfae2..481ef2c1d 100644 --- a/src/couch/src/couch_att.erl +++ b/src/couch/src/couch_att.erl @@ -481,6 +481,9 @@ flush(Fd, Att) -> flush_data(Fd, fetch(data, Att), Att). +flush_data(Fd, {stream, {couch_bt_engine_stream, {OtherFd, StreamPointer}}}, + Att) -> + flush_data(Fd, {OtherFd, StreamPointer}, Att); flush_data(Fd, {Fd0, _}, Att) when Fd0 == Fd -> % already written to our file, nothing to write Att; |