diff options
author | h0pless <h0pless@yandex-team.com> | 2024-07-08 18:08:58 +0300 |
---|---|---|
committer | h0pless <h0pless@yandex-team.com> | 2024-07-08 18:23:19 +0300 |
commit | 8da74912ee34eca48725266dc7db2f757c6d7a2a (patch) | |
tree | 8d5a46161257f60940ef5523403924b15d9c194a /library/cpp | |
parent | 677bee5c8a5ca4ec45e4ac3adcc38e7fe212ef73 (diff) | |
download | ydb-8da74912ee34eca48725266dc7db2f757c6d7a2a.tar.gz |
YT-20614: Change cross-cell copy format (in preparation for Sequoia)
The new format is better optimized for VectorizedRead, which is needed in Sequoia.
Previously, the output for the BeginCopy verb was a serialized subtree plus the list of opaque children. In a non-Sequoia world, that is useful and easy to work with. However, in Sequoia, a subtree might not be contained on the same cell, which makes it difficult to use the old data transfer format.
Now it's a vector of nodes with clear separation between them. This change makes it easier to work with VectorizedRead since the conversion between BeginCopy return and VectorizedRead(BeginCopy) return is very straight-forward. Additionally, this change helps with copying from Cypress to Sequoia, since now it's much easier to process each node individually (which is needed for Sequoia to work and not clog up one cell).
In the next PR, I'm planning on:
1. Making BeginCopy a read-request (removing snapshot locks). So the verb will only return meta-information about the requested nodes.
2. Adding a verb, executed before BeginCopy, where the locks would be taken and the general structure of the tree is returned.
017ec9971e8e0a611a7286ed748b6071cfc89048
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/yt/misc/property.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/library/cpp/yt/misc/property.h b/library/cpp/yt/misc/property.h index 4d0577f464..3c42693ef3 100644 --- a/library/cpp/yt/misc/property.h +++ b/library/cpp/yt/misc/property.h @@ -157,6 +157,23 @@ public: \ } \ static_assert(true) +//! Defines a trivial public read-write boolean property that is passed by value. +//! All arguments after name are used as default value (via braced-init-list). +#define DEFINE_BYVAL_RW_BOOLEAN_PROPERTY(name, ...) \ +protected: \ + bool name##_ { __VA_ARGS__ }; \ + \ +public: \ + Y_FORCE_INLINE bool Is##name() const \ + { \ + return name##_; \ + } \ + \ + Y_FORCE_INLINE void Set##name(bool value) \ + { \ + name##_ = value; \ + } \ + static_assert(true) //! Defines a trivial public read-write property that is passed by value. //! All arguments after name are used as default value (via braced-init-list). |