Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

NXCM-4852: EOF on deploy #697

merged 6 commits into from Dec 11, 2012


None yet
3 participants

cstamas commented Dec 7, 2012

Introduced new LocalStorage Exception to mark this, and translating it on REST level to some other status that 500 Server Error, that automagically kicks in on those response codes.

cstamas added some commits Dec 7, 2012

@cstamas cstamas NXCM-4852: Client drops connection during upload.
Introduced new LS exception that denotes EOF situation.
Most likely we really need to get rid of StorageException
@cstamas cstamas NXCM-4852: Refining response code
EOF while storing into local storage might happen in
two cases (if not counting other -- possible internal bugs):
* client uploads content, and drops connection
* proxied repository drops connection while item is being cached

Response code does not matter in 1st case, as client (who'd receive
the code) did drop the connection anyway, but we have to end the
transaction somehow.
Second case does matters, as in that case, after retries are tried
(LSEx does invoke retries, and if suppose remote peer drops connection
as many times as retries are made), responding with 404 instead
of 400 makes more sense.
@cstamas cstamas NXCM-4852: Added UT
Ensuring that when input stream of item being stored in repository
throws EOF exception (premature end of file), a newly introduced
LocalStorage exception is thrown. Distinction is needed, to handle
this case differently on REST level than all the other "local storage"
exceptions that are basically all 500 "server errors".

ifedorenko commented Dec 7, 2012


Need to verify partially downloaded files are not left behind.

cstamas added some commits Dec 10, 2012

@cstamas cstamas NXCM-4852: UT extended
UT is now checking not only the exception being
thrown when EOF occurs during storing, but also
that there are no remnant files left in storage.
@cstamas cstamas NXCM-4852: UT fix
Added check for tmp files too, and changed when EOF is
thrown to ensure we got _some_ content.
@cstamas cstamas NXCM-4852: Explained response code 4c66cb7

cstamas commented Dec 11, 2012

CI +1'd


nabcos commented Dec 11, 2012



ifedorenko commented Dec 11, 2012


@cstamas cstamas added a commit that referenced this pull request Dec 11, 2012

@cstamas cstamas Merge pull request #697 from sonatype/nxcm-4852
NXCM-4852: EOF on deploy

@cstamas cstamas merged commit 742de42 into master Dec 11, 2012

@cstamas cstamas added a commit that referenced this pull request Dec 12, 2012

@cstamas @peterlynch cstamas + peterlynch Merge pull request #697 from sonatype/nxcm-4852
NXCM-4852: EOF on deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment