Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
aerospike
as_status.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright 2008-2013 by Aerospike.
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a copy
5
* of this software and associated documentation files (the "Software"), to
6
* deal in the Software without restriction, including without limitation the
7
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8
* sell copies of the Software, and to permit persons to whom the Software is
9
* furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20
* IN THE SOFTWARE.
21
******************************************************************************/
22
23
#pragma once
24
25
/*******************************************************************************
26
* TYPES
27
******************************************************************************/
28
29
/**
30
* Status codes used as return values as as_error.code values.
31
*/
32
typedef
enum
as_status_e {
33
34
/***************************************************************************
35
* SUCCESS (all < 100)
36
**************************************************************************/
37
38
/**
39
* Generic success.
40
*/
41
AEROSPIKE_OK
= 0,
42
43
/***************************************************************************
44
* ERRORS (all >= 100)
45
**************************************************************************/
46
47
/**
48
* Generic error.
49
*/
50
AEROSPIKE_ERR
= 100,
51
52
/***************************************************************************
53
* CLIENT API USAGE
54
**************************************************************************/
55
56
/**
57
* Generic client API usage error.
58
*/
59
AEROSPIKE_ERR_CLIENT
= 200,
60
61
/**
62
* Invalid client API parameter.
63
*/
64
AEROSPIKE_ERR_PARAM
= 201,
65
66
/***************************************************************************
67
* CLUSTER DISCOVERY & CONNECTION
68
**************************************************************************/
69
70
/**
71
* Generic cluster discovery & connection error.
72
*/
73
AEROSPIKE_ERR_CLUSTER
= 300,
74
75
/***************************************************************************
76
* INCOMPLETE REQUESTS (i.e. NOT from server-returned error codes)
77
**************************************************************************/
78
79
/**
80
* Request timed out.
81
*/
82
AEROSPIKE_ERR_TIMEOUT
= 400,
83
84
/**
85
* Request randomly dropped by client for throttling.
86
* @warning Not yet supported.
87
*/
88
AEROSPIKE_ERR_THROTTLED
= 401,
89
90
/***************************************************************************
91
* COMPLETED REQUESTS (all >= 500, from server-returned error codes)
92
**************************************************************************/
93
94
/**
95
* Generic error returned by server.
96
*/
97
AEROSPIKE_ERR_SERVER
= 500,
98
99
/**
100
* Request protocol invalid, or invalid protocol field.
101
*/
102
AEROSPIKE_ERR_REQUEST_INVALID
= 501,
103
104
/**
105
* Namespace in request not found on server.
106
* @warning Not yet supported, shows as AEROSPIKE_ERR_REQUEST_INVALID.
107
*/
108
AEROSPIKE_ERR_NAMESPACE_NOT_FOUND
= 502,
109
110
/**
111
* The server node is running out of memory and/or storage device space
112
* reserved for the specified namespace.
113
*/
114
AEROSPIKE_ERR_SERVER_FULL
= 503,
115
116
/**
117
* A cluster state change occurred during the request. This may also be
118
* returned by scan operations with the fail_on_cluster_change flag set.
119
*/
120
AEROSPIKE_ERR_CLUSTER_CHANGE
= 504,
121
122
/**
123
* Sometimes our doc, or our customers wishes, get ahead of us. We may have
124
* processed something that the server is not ready for (unsupported feature).
125
*/
126
AEROSPIKE_ERR_UNSUPPORTED_FEATURE
= 505,
127
128
/***************************************************************************
129
* RECORD-SPECIFIC
130
**************************************************************************/
131
132
/**
133
* Generic record error.
134
*/
135
AEROSPIKE_ERR_RECORD
= 600,
136
137
/**
138
* Too may concurrent requests for one record - a "hot-key" situation.
139
*/
140
AEROSPIKE_ERR_RECORD_BUSY
= 601,
141
142
/**
143
* Record does not exist in database. May be returned by read, or write
144
* with policy AS_POLICY_EXISTS_UPDATE.
145
* @warning AS_POLICY_EXISTS_UPDATE not yet supported.
146
*/
147
AEROSPIKE_ERR_RECORD_NOT_FOUND
= 602,
148
149
/**
150
* Record already exists. May be returned by write with policy
151
* AS_POLICY_EXISTS_CREATE.
152
*/
153
AEROSPIKE_ERR_RECORD_EXISTS
= 603,
154
155
/**
156
* Generation of record in database does not satisfy write policy.
157
*/
158
AEROSPIKE_ERR_RECORD_GENERATION
= 604,
159
160
/**
161
* Record being (re-)written can't fit in a storage write block.
162
*/
163
AEROSPIKE_ERR_RECORD_TOO_BIG
= 605,
164
165
/**
166
* Bin modification operation can't be done on an existing bin due to its
167
* value type.
168
*/
169
AEROSPIKE_ERR_BIN_INCOMPATIBLE_TYPE
= 606,
170
171
/***************************************************************************
172
* XDR-SPECIFIC
173
**************************************************************************/
174
175
/**
176
* XDR is not available for the cluster.
177
*/
178
AEROSPIKE_ERR_NO_XDR
= 900,
179
180
/***************************************************************************
181
* SCAN OPERATIONS
182
**************************************************************************/
183
184
/**
185
* Generic scan error.
186
*/
187
AEROSPIKE_ERR_SCAN
= 1000,
188
189
/**
190
* Scan aborted by user.
191
*/
192
AEROSPIKE_ERR_SCAN_ABORTED
= 1001,
193
194
/***************************************************************************
195
* QUERY OPERATIONS
196
**************************************************************************/
197
198
/**
199
* Generic query error.
200
*/
201
AEROSPIKE_ERR_QUERY
= 1100,
202
203
/**
204
* Query was aborted.
205
*/
206
AEROSPIKE_ERR_QUERY_ABORTED
= 1101,
207
208
/**
209
* Query processing queue is full.
210
*/
211
AEROSPIKE_ERR_QUERY_QUEUE_FULL
= 1102,
212
213
/***************************************************************************
214
* SECONDARY INDEX OPERATIONS
215
**************************************************************************/
216
217
/**
218
* Generic secondary index error.
219
*/
220
AEROSPIKE_ERR_INDEX
= 1200,
221
222
/**
223
* Index is out of memory
224
*/
225
AEROSPIKE_ERR_INDEX_OOM
= 1201,
226
227
/**
228
* Index not found
229
*/
230
AEROSPIKE_ERR_INDEX_NOT_FOUND
= 1202,
231
232
/**
233
* Index found.
234
*/
235
AEROSPIKE_ERR_INDEX_FOUND
= 1203,
236
237
/**
238
* Unable to read the index.
239
*/
240
AEROSPIKE_ERR_INDEX_NOT_READABLE
= 1204,
241
242
/***************************************************************************
243
* UDF OPERATIONS
244
**************************************************************************/
245
246
/**
247
* Generic UDF error.
248
*/
249
AEROSPIKE_ERR_UDF
= 1300,
250
251
/**
252
* UDF does not exist.
253
*/
254
AEROSPIKE_ERR_UDF_NOT_FOUND
= 1301,
255
256
257
/***************************************************************************
258
* Large Data Type (LDT) OPERATIONS
259
**************************************************************************/
260
261
/** Internal LDT error. */
262
AEROSPIKE_ERR_LDT_INTERNAL
= 1400,
263
264
/** LDT item not found */
265
AEROSPIKE_ERR_LDT_NOT_FOUND
= 1401,
266
267
/** Unique key violation: Duplicated item inserted when 'unique key" was set.*/
268
AEROSPIKE_ERR_LDT_UNIQUE_KEY
= 1402,
269
270
/** General error during insert operation. */
271
AEROSPIKE_ERR_LDT_INSERT
= 1403,
272
273
/** General error during search operation. */
274
AEROSPIKE_ERR_LDT_SEARCH
= 1404,
275
276
/** General error during delete operation. */
277
AEROSPIKE_ERR_LDT_DELETE
= 1405,
278
279
280
/** General input parameter error. */
281
AEROSPIKE_ERR_LDT_INPUT_PARM
= 1409,
282
283
// -------------------------------------------------
284
285
/** LDT Type mismatch for this bin. */
286
AEROSPIKE_ERR_LDT_TYPE_MISMATCH
= 1410,
287
288
/** The supplied LDT bin name is null. */
289
AEROSPIKE_ERR_LDT_NULL_BIN_NAME
= 1411,
290
291
/** The supplied LDT bin name must be a string. */
292
AEROSPIKE_ERR_LDT_BIN_NAME_NOT_STRING
= 1412,
293
294
/** The supplied LDT bin name exceeded the 14 char limit. */
295
AEROSPIKE_ERR_LDT_BIN_NAME_TOO_LONG
= 1413,
296
297
/** Internal Error: too many open records at one time. */
298
AEROSPIKE_ERR_LDT_TOO_MANY_OPEN_SUBRECS
= 1414,
299
300
/** Internal Error: Top Record not found. */
301
AEROSPIKE_ERR_LDT_TOP_REC_NOT_FOUND
= 1415,
302
303
/** Internal Error: Sub Record not found. */
304
AEROSPIKE_ERR_LDT_SUB_REC_NOT_FOUND
= 1416,
305
306
/** LDT Bin does not exist. */
307
AEROSPIKE_ERR_LDT_BIN_DOES_NOT_EXIST
= 1417,
308
309
/** Collision: LDT Bin already exists. */
310
AEROSPIKE_ERR_LDT_BIN_ALREADY_EXISTS
= 1418,
311
312
/** LDT control structures in the Top Record are damaged. Cannot proceed. */
313
AEROSPIKE_ERR_LDT_BIN_DAMAGED
= 1419,
314
315
// -------------------------------------------------
316
317
/** Internal Error: LDT Subrecord pool is damaged. */
318
AEROSPIKE_ERR_LDT_SUBREC_POOL_DAMAGED
= 1420,
319
320
/** LDT control structures in the Sub Record are damaged. Cannot proceed. */
321
AEROSPIKE_ERR_LDT_SUBREC_DAMAGED
= 1421,
322
323
/** Error encountered while opening a Sub Record. */
324
AEROSPIKE_ERR_LDT_SUBREC_OPEN
= 1422,
325
326
/** Error encountered while updating a Sub Record. */
327
AEROSPIKE_ERR_LDT_SUBREC_UPDATE
= 1423,
328
329
/** Error encountered while creating a Sub Record. */
330
AEROSPIKE_ERR_LDT_SUBREC_CREATE
= 1424,
331
332
/** Error encountered while deleting a Sub Record. */
333
AEROSPIKE_ERR_LDT_SUBREC_DELETE
= 1425,
334
335
/** Error encountered while closing a Sub Record. */
336
AEROSPIKE_ERR_LDT_SUBREC_CLOSE
= 1426,
337
338
// -------------------------------------------------
339
340
/** The filter function name was invalid. */
341
AEROSPIKE_ERR_LDT_FILTER_FUNCTION_BAD
= 1430,
342
343
/** The filter function was not found. */
344
AEROSPIKE_ERR_LDT_FILTER_FUNCTION_NOT_FOUND
= 1431,
345
346
/** The function to extract the Unique Value from a complex object was invalid. */
347
AEROSPIKE_ERR_LDT_KEY_FUNCTION_BAD
= 1432,
348
349
/** The function to extract the Unique Value from a complex object was not found. */
350
AEROSPIKE_ERR_LDT_KEY_FUNCTION_NOT_FOUND
= 1433,
351
352
/** The function to transform an object into a binary form was invalid. */
353
AEROSPIKE_ERR_LDT_TRANS_FUNCTION_BAD
= 1434,
354
355
/** The function to transform an object into a binary form was not found. */
356
AEROSPIKE_ERR_LDT_TRANS_FUNCTION_NOT_FOUND
= 1435,
357
358
/** The function to untransform an object from binary form to live form was invalid. */
359
AEROSPIKE_ERR_LDT_UNTRANS_FUNCTION_BAD
= 1436,
360
361
/** The function to untransform an object from binary form to live form not found. */
362
AEROSPIKE_ERR_LDT_UNTRANS_FUNCTION_NOT_FOUND
= 1437,
363
364
/** The UDF user module name for LDT Overrides was invalid */
365
AEROSPIKE_ERR_LDT_USER_MODULE_BAD
= 1438,
366
367
/** The UDF user module name for LDT Overrides was not found */
368
AEROSPIKE_ERR_LDT_USER_MODULE_NOT_FOUND
= 1439
369
370
}
as_status
;