1/* migrate_ce.c
2 *
3 * Copyright (C) 2016-2018 Aerospike, Inc.
4 *
5 * Portions may be licensed to Aerospike, Inc. under one or more contributor
6 * license agreements.
7 *
8 * This program is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU Affero General Public License as published by the Free
10 * Software Foundation, either version 3 of the License, or (at your option) any
11 * later version.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
16 * details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see http://www.gnu.org/licenses/
20 */
21
22
23//==========================================================
24// Includes.
25//
26
27#include "fabric/migrate.h"
28
29#include <stdbool.h>
30#include <stddef.h>
31#include <stdint.h>
32
33#include "citrusleaf/cf_queue.h"
34
35#include "fault.h"
36#include "msg.h"
37#include "node.h"
38
39#include "base/datamodel.h"
40#include "fabric/fabric.h"
41
42
43//==========================================================
44// Typedefs & constants.
45//
46
47const uint32_t MY_MIG_FEATURES = 0;
48
49
50//==========================================================
51// Community Edition API.
52//
53
54void
55emigrate_fill_queue_init()
56{
57}
58
59void
60emigrate_queue_push(emigration *emig)
61{
62 cf_queue_push(&g_emigration_q, &emig);
63}
64
65bool
66should_emigrate_record(emigration *emig, as_index_ref *r_ref)
67{
68 return true;
69}
70
71uint32_t
72emigration_pack_info(const emigration *emig, const as_record *r)
73{
74 return 0;
75}
76
77void
78emigration_handle_meta_batch_request(cf_node src, msg *m)
79{
80 cf_warning(AS_MIGRATE, "CE node received meta-batch request - unexpected");
81 as_fabric_msg_put(m);
82}
83
84bool
85immigration_ignore_pickle(const uint8_t *buf, uint32_t info)
86{
87 return as_record_pickle_is_binless(buf);
88}
89
90void
91immigration_init_repl_state(as_remote_record* rr, uint32_t info)
92{
93}
94
95void
96immigration_handle_meta_batch_ack(cf_node src, msg *m)
97{
98 cf_warning(AS_MIGRATE, "CE node received meta-batch ack - unexpected");
99 as_fabric_msg_put(m);
100}
101
102bool
103immigration_start_meta_sender(immigration *immig, uint32_t emig_features,
104 uint64_t emig_partition_sz)
105{
106 return false;
107}
108