[Tarantool-patches] [PATCH 1/3] tuple: move tuple_update into xrow_update/ folder

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Nov 1 02:43:05 MSK 2019


Tuple_update.c already uses xrow_update_ namespace. Soon it will
have more files extending this namespace. In order to keep them
isolated they are moved to a new subfolder box/xrow_update/.

Part of #1261
---
 src/box/CMakeLists.txt                                |  2 +-
 src/box/lua/tuple.c                                   |  2 +-
 src/box/memtx_space.c                                 |  2 +-
 src/box/space.c                                       |  2 +-
 src/box/tuple.c                                       |  3 +--
 src/box/tuple.h                                       |  2 +-
 src/box/vinyl.c                                       |  2 +-
 src/box/vy_upsert.c                                   |  2 +-
 src/box/{tuple_update.c => xrow_update/xrow_update.c} | 11 +++++------
 src/box/{tuple_update.h => xrow_update/xrow_update.h} |  6 +++---
 test/unit/column_mask.c                               |  2 +-
 11 files changed, 17 insertions(+), 19 deletions(-)
 rename src/box/{tuple_update.c => xrow_update/xrow_update.c} (99%)
 rename src/box/{tuple_update.h => xrow_update/xrow_update.h} (95%)

diff --git a/src/box/CMakeLists.txt b/src/box/CMakeLists.txt
index 9d2fcea4b..351ec69f5 100644
--- a/src/box/CMakeLists.txt
+++ b/src/box/CMakeLists.txt
@@ -40,7 +40,7 @@ add_library(tuple STATIC
     tuple.c
     field_map.c
     tuple_format.c
-    tuple_update.c
+    xrow_update/xrow_update.c
     tuple_compare.cc
     tuple_extract_key.cc
     tuple_hash.cc
diff --git a/src/box/lua/tuple.c b/src/box/lua/tuple.c
index 4b6298cb5..355308545 100644
--- a/src/box/lua/tuple.c
+++ b/src/box/lua/tuple.c
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  */
 #include "box/lua/tuple.h"
-#include "box/tuple_update.h"
+#include "box/xrow_update/xrow_update.h"
 
 #include "lua/utils.h" /* luaT_error() */
 #include "lua/msgpack.h" /* luamp_encode_XXX() */
diff --git a/src/box/memtx_space.c b/src/box/memtx_space.c
index 601e98ce5..4928f0b0a 100644
--- a/src/box/memtx_space.c
+++ b/src/box/memtx_space.c
@@ -33,7 +33,7 @@
 #include "iproto_constants.h"
 #include "txn.h"
 #include "tuple.h"
-#include "tuple_update.h"
+#include "xrow_update/xrow_update.h"
 #include "xrow.h"
 #include "memtx_hash.h"
 #include "memtx_tree.h"
diff --git a/src/box/space.c b/src/box/space.c
index 042be042c..734c7e16b 100644
--- a/src/box/space.c
+++ b/src/box/space.c
@@ -39,7 +39,7 @@
 #include "session.h"
 #include "txn.h"
 #include "tuple.h"
-#include "tuple_update.h"
+#include "xrow_update/xrow_update.h"
 #include "request.h"
 #include "xrow.h"
 #include "iproto_constants.h"
diff --git a/src/box/tuple.c b/src/box/tuple.c
index 261505f9a..fd51b71da 100644
--- a/src/box/tuple.c
+++ b/src/box/tuple.c
@@ -35,8 +35,7 @@
 #include "fiber.h"
 #include "small/quota.h"
 #include "small/small.h"
-
-#include "tuple_update.h"
+#include "xrow_update/xrow_update.h"
 #include "coll_id_cache.h"
 
 static struct mempool tuple_iterator_pool;
diff --git a/src/box/tuple.h b/src/box/tuple.h
index ab0c7a99b..0500a6df7 100644
--- a/src/box/tuple.h
+++ b/src/box/tuple.h
@@ -1115,7 +1115,7 @@ tuple_to_buf(struct tuple *tuple, char *buf, size_t size);
 #if defined(__cplusplus)
 } /* extern "C" */
 
-#include "tuple_update.h"
+#include "xrow_update/xrow_update.h"
 #include "errinj.h"
 
 /* @copydoc tuple_field_with_type() */
diff --git a/src/box/vinyl.c b/src/box/vinyl.c
index a2bbaa529..98d53e86d 100644
--- a/src/box/vinyl.c
+++ b/src/box/vinyl.c
@@ -58,7 +58,7 @@
 #include "coio_task.h"
 #include "cbus.h"
 #include "histogram.h"
-#include "tuple_update.h"
+#include "xrow_update/xrow_update.h"
 #include "txn.h"
 #include "xrow.h"
 #include "xlog.h"
diff --git a/src/box/vy_upsert.c b/src/box/vy_upsert.c
index 817d29cfd..7651fde80 100644
--- a/src/box/vy_upsert.c
+++ b/src/box/vy_upsert.c
@@ -34,7 +34,7 @@
 #include <small/region.h>
 #include <msgpuck/msgpuck.h>
 #include "vy_stmt.h"
-#include "tuple_update.h"
+#include "xrow_update/xrow_update.h"
 #include "fiber.h"
 #include "column_mask.h"
 
diff --git a/src/box/tuple_update.c b/src/box/xrow_update/xrow_update.c
similarity index 99%
rename from src/box/tuple_update.c
rename to src/box/xrow_update/xrow_update.c
index 9e926d59d..d7f1fa33e 100644
--- a/src/box/tuple_update.c
+++ b/src/box/xrow_update/xrow_update.c
@@ -28,23 +28,22 @@
  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-
-#include "tuple_update.h"
+#include "xrow_update.h"
 #include <stdbool.h>
 
 #include "say.h"
-#include "error.h"
+#include "box/error.h"
 #include "diag.h"
 #include "trivia/util.h"
 #include "third_party/queue.h"
 #include <msgpuck/msgpuck.h>
 #include <bit/int96.h>
-#include "column_mask.h"
+#include "box/column_mask.h"
 #include "mp_extension_types.h"
 #include "mp_decimal.h"
 #include "fiber.h"
-#include "tuple_dictionary.h"
-#include "tuple_format.h"
+#include "box/tuple_dictionary.h"
+#include "box/tuple_format.h"
 #include "tt_static.h"
 
 /** UPDATE request implementation.
diff --git a/src/box/tuple_update.h b/src/box/xrow_update/xrow_update.h
similarity index 95%
rename from src/box/tuple_update.h
rename to src/box/xrow_update/xrow_update.h
index b6210dd38..3aac74e60 100644
--- a/src/box/tuple_update.h
+++ b/src/box/xrow_update/xrow_update.h
@@ -1,5 +1,5 @@
-#ifndef TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED
-#define TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED
+#ifndef TARANTOOL_BOX_XROW_UPDATE_H_INCLUDED
+#define TARANTOOL_BOX_XROW_UPDATE_H_INCLUDED
 /*
  * Copyright 2010-2016, Tarantool AUTHORS, please see AUTHORS file.
  *
@@ -83,4 +83,4 @@ tuple_upsert_squash(const char *expr1, const char *expr1_end,
 } /* extern "C" */
 #endif /* defined(__cplusplus) */
 
-#endif /* TARANTOOL_BOX_TUPLE_UPDATE_H_INCLUDED */
+#endif /* TARANTOOL_BOX_XROW_UPDATE_H_INCLUDED */
diff --git a/test/unit/column_mask.c b/test/unit/column_mask.c
index 5ee8b7332..fbe6c7b43 100644
--- a/test/unit/column_mask.c
+++ b/test/unit/column_mask.c
@@ -1,5 +1,5 @@
 #include "column_mask.h"
-#include "tuple_update.h"
+#include "xrow_update/xrow_update.h"
 #include "unit.h"
 #include "msgpuck.h"
 #include "trivia/util.h"
-- 
2.21.0 (Apple Git-122.2)



More information about the Tarantool-patches mailing list