Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Fix replication failure for files with exact MB sizes
type: fixed
authors:
- name: Shubham Ranjan
links:
- name: SOLR-18098
url: https://issues.apache.org/jira/browse/SOLR-18098
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,13 @@ public void write(OutputStream out) throws IOException {
while (true) {
offset = offset == -1 ? 0 : offset;
int read = (int) Math.min(buf.length, filelen - offset);

if (read <= 0) {
writeNothingAndFlush();
fos.close();
break;
}

in.readBytes(buf, 0, read);

fos.writeInt(read);
Expand Down
Loading
Loading