From d56906cd540c48e8ebc0097ca7fc7aba92f2a28e Mon Sep 17 00:00:00 2001 From: sfc-gh-tclinkenbeard Date: Mon, 3 May 2021 15:26:27 -0700 Subject: [PATCH] Addressed review comments --- fdbrpc/AsyncFileEncrypted.actor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fdbrpc/AsyncFileEncrypted.actor.cpp b/fdbrpc/AsyncFileEncrypted.actor.cpp index 948630a700..4fda5a77e4 100644 --- a/fdbrpc/AsyncFileEncrypted.actor.cpp +++ b/fdbrpc/AsyncFileEncrypted.actor.cpp @@ -85,6 +85,7 @@ public: ACTOR static Future write(AsyncFileEncrypted* self, void const* data, int length, int64_t offset) { ASSERT(self->canWrite); + // All writes must append to the end of the file: ASSERT(offset == self->currentBlock * FLOW_KNOBS->ENCRYPTION_BLOCK_SIZE + self->offsetInBlock); state unsigned char const* input = reinterpret_cast(data); while (length > 0) { @@ -176,12 +177,12 @@ std::string AsyncFileEncrypted::getFilename() const { } Future AsyncFileEncrypted::readZeroCopy(void** data, int* length, int64_t offset) { - ASSERT(false); // Not implemented + throw io_error(); return Void(); } void AsyncFileEncrypted::releaseZeroCopy(void* data, int length, int64_t offset) { - ASSERT(false); // Not implemented + throw io_error(); } int64_t AsyncFileEncrypted::debugFD() const {