diff options
author | kvk1920 <[email protected]> | 2024-03-20 17:47:14 +0300 |
---|---|---|
committer | kvk1920 <[email protected]> | 2024-03-20 18:08:54 +0300 |
commit | 3a5046abc1fc21fdb854293535e08beb0ea81d39 (patch) | |
tree | 2e095f73d3ba2d41d20b11fabf626ecd1ecca3b0 | |
parent | a352a04f477457eb94fc8d4ab61a97e0993d8d37 (diff) |
Some chunk reincarnator improvements
- add some tests for versioned chunks
- add config option to skip versioned chunks
- more reliable check for concurrent dynamic table mount
b0f8fb06df6f8da740ec197cdfd178ca19374f7f
-rw-r--r-- | yt/yt/client/driver/query_commands.cpp | 2 | ||||
-rw-r--r-- | yt/yt/client/driver/queue_commands.cpp | 4 | ||||
-rw-r--r-- | yt/yt/client/driver/table_commands.cpp | 10 | ||||
-rw-r--r-- | yt/yt/client/table_client/unversioned_writer.h | 4 | ||||
-rw-r--r-- | yt/yt/client/table_client/value_consumer.cpp | 2 | ||||
-rw-r--r-- | yt/yt/client/table_client/versioned_writer.h | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/yt/yt/client/driver/query_commands.cpp b/yt/yt/client/driver/query_commands.cpp index 4df99dda83c..bdeaf9ffff3 100644 --- a/yt/yt/client/driver/query_commands.cpp +++ b/yt/yt/client/driver/query_commands.cpp @@ -182,7 +182,7 @@ void TReadQueryResultCommand::DoExecute(ICommandContextPtr context) New<TControlAttributesConfig>(), /*keyColumnCount*/ 0); - writer->Write(rowset->GetRows()); + Y_UNUSED(writer->Write(rowset->GetRows())); WaitFor(writer->Close()) .ThrowOnError(); } diff --git a/yt/yt/client/driver/queue_commands.cpp b/yt/yt/client/driver/queue_commands.cpp index 5cc283e32d6..ccb52d8cc1b 100644 --- a/yt/yt/client/driver/queue_commands.cpp +++ b/yt/yt/client/driver/queue_commands.cpp @@ -147,7 +147,7 @@ void TPullQueueCommand::DoExecute(ICommandContextPtr context) auto output = context->Request().OutputStream; auto writer = CreateSchemafulWriterForFormat(format, result->GetSchema(), output); - writer->Write(result->GetRows()); + Y_UNUSED(writer->Write(result->GetRows())); WaitFor(writer->Close()) .ThrowOnError(); @@ -211,7 +211,7 @@ void TPullConsumerCommand::DoExecute(ICommandContextPtr context) auto output = context->Request().OutputStream; auto writer = CreateSchemafulWriterForFormat(format, result->GetSchema(), output); - writer->Write(result->GetRows()); + Y_UNUSED(writer->Write(result->GetRows())); WaitFor(writer->Close()) .ThrowOnError(); diff --git a/yt/yt/client/driver/table_commands.cpp b/yt/yt/client/driver/table_commands.cpp index a74c854b740..3945305f115 100644 --- a/yt/yt/client/driver/table_commands.cpp +++ b/yt/yt/client/driver/table_commands.cpp @@ -837,7 +837,7 @@ void TSelectRowsCommand::DoExecute(ICommandContextPtr context) auto output = context->Request().OutputStream; auto writer = CreateSchemafulWriterForFormat(format, rowset->GetSchema(), output); - writer->Write(rowset->GetRows()); + Y_UNUSED(writer->Write(rowset->GetRows())); WaitFor(writer->Close()) .ThrowOnError(); @@ -1104,7 +1104,7 @@ void TLookupRowsCommand::DoExecute(ICommandContextPtr context) .ValueOrThrow() .Rowset; auto writer = CreateVersionedWriterForFormat(format, rowset->GetSchema(), output); - writer->Write(rowset->GetRows()); + Y_UNUSED(writer->Write(rowset->GetRows())); WaitFor(writer->Close()) .ThrowOnError(); } else { @@ -1117,7 +1117,7 @@ void TLookupRowsCommand::DoExecute(ICommandContextPtr context) .ValueOrThrow() .Rowset; auto writer = CreateSchemafulWriterForFormat(format, rowset->GetSchema(), output); - writer->Write(rowset->GetRows()); + Y_UNUSED(writer->Write(rowset->GetRows())); WaitFor(writer->Close()) .ThrowOnError(); } @@ -1183,12 +1183,12 @@ void TPullRowsCommand::DoExecute(ICommandContextPtr context) if (pullResult.Versioned) { auto writer = CreateVersionedWriterForFormat(format, pullResult.Rowset->GetSchema(), output); - writer->Write(ReinterpretCastRange<TVersionedRow>(pullResult.Rowset->GetRows())); + Y_UNUSED(writer->Write(ReinterpretCastRange<TVersionedRow>(pullResult.Rowset->GetRows()))); WaitFor(writer->Close()) .ThrowOnError(); } else { auto writer = CreateSchemafulWriterForFormat(format, pullResult.Rowset->GetSchema(), output); - writer->Write(ReinterpretCastRange<TUnversionedRow>(pullResult.Rowset->GetRows())); + Y_UNUSED(writer->Write(ReinterpretCastRange<TUnversionedRow>(pullResult.Rowset->GetRows()))); WaitFor(writer->Close()) .ThrowOnError(); } diff --git a/yt/yt/client/table_client/unversioned_writer.h b/yt/yt/client/table_client/unversioned_writer.h index 3e41ee3415b..8f5e9f37f26 100644 --- a/yt/yt/client/table_client/unversioned_writer.h +++ b/yt/yt/client/table_client/unversioned_writer.h @@ -22,12 +22,12 @@ struct IUnversionedRowsetWriter /*! * Writes given rows. * - * The returned value is |true| iff one can write next rowset immediately, + * The returned value is |true| if one can write next rowset immediately, * otherwise one should wait for |GetReadyEvent()| future. * * Every row must contain exactly one value for each column in schema, in the same order. */ - virtual bool Write(TRange<TUnversionedRow> rows) = 0; + [[nodiscard]] virtual bool Write(TRange<TUnversionedRow> rows) = 0; }; DEFINE_REFCOUNTED_TYPE(IUnversionedRowsetWriter) diff --git a/yt/yt/client/table_client/value_consumer.cpp b/yt/yt/client/table_client/value_consumer.cpp index ea097ea2e8d..630f849f97c 100644 --- a/yt/yt/client/table_client/value_consumer.cpp +++ b/yt/yt/client/table_client/value_consumer.cpp @@ -343,7 +343,7 @@ TFuture<void> TWritingValueConsumer::Flush() .ThrowOnError(); } - writer->Write(rows); + Y_UNUSED(writer->Write(rows)); rowBuffer->Clear(); return writer->GetReadyEvent(); }) diff --git a/yt/yt/client/table_client/versioned_writer.h b/yt/yt/client/table_client/versioned_writer.h index 7c4c3980eaa..8d5a82452ad 100644 --- a/yt/yt/client/table_client/versioned_writer.h +++ b/yt/yt/client/table_client/versioned_writer.h @@ -27,7 +27,7 @@ struct IVersionedWriter * The caller must wait for asynchronous flag provided by #GetReadyEvent to become set. * The latter may indicate an error occurred while fetching more data. */ - virtual bool Write(TRange<TVersionedRow> rows) = 0; + [[nodiscard]] virtual bool Write(TRange<TVersionedRow> rows) = 0; }; DEFINE_REFCOUNTED_TYPE(IVersionedWriter) |