diff options
author | Nick Vatamaniuc <vatamane@apache.org> | 2017-06-05 18:16:45 -0400 |
---|---|---|
committer | Paul J. Davis <paul.joseph.davis@gmail.com> | 2017-09-27 14:57:25 -0500 |
commit | 49b05fe5aa017a624cc323f15afc0972882bed54 (patch) | |
tree | b48c8b38acbe9d5d9acf572aa168618a96873ed5 | |
parent | 47b5e681087c59eb0c882714c7810447c972bc31 (diff) | |
download | couchdb-COUCHDB-3288-mixed-cluster-upgrade.tar.gz |
Handle attachments downgrades in a mixed cluster environmentCOUCHDB-3288-mixed-cluster-upgrade
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.
COUCHDB-3288
-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 5c040a8c4..3380f5739 100644 --- a/src/couch/src/couch_att.erl +++ b/src/couch/src/couch_att.erl @@ -494,6 +494,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; |