Page MenuHomePhabricator

[services] Blob - Add server reactor implementations - get reactor
ClosedPublic

Authored by karol on Mar 21 2022, 2:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 3, 8:49 AM
Unknown Object (File)
Sun, Jun 30, 11:49 AM
Unknown Object (File)
Sun, Jun 30, 11:49 AM
Unknown Object (File)
Sun, Jun 30, 11:49 AM
Unknown Object (File)
Sun, Jun 30, 11:49 AM
Unknown Object (File)
Sun, Jun 30, 11:49 AM
Unknown Object (File)
Sun, Jun 30, 11:46 AM
Unknown Object (File)
Sat, Jun 29, 11:19 PM

Details

Summary

Depends on D3520

Add implementations for the server reactors - get reactor

Test Plan
cd services
yarn run-backup-service

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

karol retitled this revision from [services] Blob - Add server reactor implementations to [draft] [services] Blob - Add server reactor implementations.Mar 21 2022, 3:18 AM
services/blob/docker-server/contents/server/src/Reactors/server/PutReactor.h
81–97 ↗(On Diff #10546)

This logic can be cleaned up to reduce indentation. See note here

karol retitled this revision from [draft] [services] Blob - Add server reactor implementations to [draft] [services] Blob - Add server reactor implementations - get reactor.
karol edited the summary of this revision. (Show Details)
karol edited the summary of this revision. (Show Details)

update

tomek added inline comments.
services/blob/src/Reactors/server/GetReactor.h
55 ↗(On Diff #10689)

Why do we add 1 here?

This revision is now accepted and ready to land.Mar 25 2022, 9:01 AM
services/blob/src/Reactors/server/GetReactor.h
55 ↗(On Diff #10689)

For now, I don't have an answer right away. This was introduced in D2672. I removed the + 1 and ran the blob test and it failed, saying that the retrieved string differed from the original one.

If you feel a strong need to know why exactly this is needed, I can check, but I'm willing to trust our previous reviews as well as tests results.

karol retitled this revision from [draft] [services] Blob - Add server reactor implementations - get reactor to [services] Blob - Add server reactor implementations - get reactor.

It is accepted as a draft so I removed the draft label and I'm requesting changes once again to keep the appropriate order of events.

tomek requested changes to this revision.Mar 30 2022, 4:19 AM
tomek added inline comments.
services/blob/src/Reactors/server/GetReactor.h
55 ↗(On Diff #10689)

It looks like Aws::IOStream is just a wrapper on std::basic_iostream where get method:

reads at most count-1 characters and stores them into character string pointed to by s until '\n' is found

So having +1 here makes sense.

Do you know if we can have \n in this file? If yes, then should we modify the logic so that reading doesn't stop on \n?

This revision now requires changes to proceed.Mar 30 2022, 4:19 AM
karol added inline comments.
services/blob/src/Reactors/server/GetReactor.h
55 ↗(On Diff #10689)

Nice catch with the \n!
The objects are properly stored with the newline signs but reading seems problematic indeed.
Thank you for catching this, I'm going to fix this!

55 ↗(On Diff #10689)
This revision is now accepted and ready to land.Apr 1 2022, 4:11 AM