Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3733379
D3634.id11411.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3634.id11411.diff
View Options
diff --git a/services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h b/services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h
--- a/services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h
+++ b/services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h
@@ -88,7 +88,28 @@
std::unique_ptr<grpc::Status>
PullBackupReactor::writeResponse(backup::PullBackupResponse *response) {
- throw std::runtime_error("unimplemented");
+ // we make sure that the blob client's state is flushed to the main memory
+ // as there may be multiple threads from the pool taking over here
+ const std::lock_guard<std::mutex> lock(this->reactorStateMutex);
+ switch (this->state) {
+ case State::COMPACTION: {
+ this->initializeGetReactor(this->backupItem->getCompactionHolder());
+ std::string dataChunk;
+ this->dataChunks->blockingRead(dataChunk);
+ if (dataChunk.empty()) {
+ // TODO try to immediately start writing logs instead of wasting a cycle
+ // sending nothing
+ this->state = State::LOGS;
+ return nullptr;
+ }
+ response->set_compactionchunk(dataChunk);
+ return nullptr;
+ }
+ case State::LOGS: {
+ throw std::runtime_error("unimplemented");
+ }
+ }
+ throw std::runtime_error("unhandled state");
}
} // namespace reactor
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 2:30 AM (11 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2842826
Default Alt Text
D3634.id11411.diff (1 KB)
Attached To
Mode
D3634: [services] Backup - pull backup reactor - compaction - write response
Attached
Detach File
Event Timeline
Log In to Comment