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-2015 Aerospike, Inc.
3
*
4
* Portions may be licensed to Aerospike, Inc. under one or more contributor
5
* license agreements.
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
8
* use this file except in compliance with the License. You may obtain a copy of
9
* the License at http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
* License for the specific language governing permissions and limitations under
15
* the License.
16
*/
17
#pragma once
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
23
/*******************************************************************************
24
* TYPES
25
******************************************************************************/
26
27
/**
28
* Status codes used as return values as as_error.code values.
29
*/
30
typedef
enum
as_status_e {
31
32
/***************************************************************************
33
* Client Errors
34
**************************************************************************/
35
36
/**
37
* Query or scan was aborted in user's callback.
38
*/
39
AEROSPIKE_ERR_CLIENT_ABORT
= -5,
40
41
/**
42
* Host name could not be found in DNS lookup.
43
*/
44
AEROSPIKE_ERR_INVALID_HOST
= -4,
45
46
/**
47
* No more records available when parsing batch, scan or query records.
48
*/
49
AEROSPIKE_NO_MORE_RECORDS
= -3,
50
51
/**
52
* Invalid client API parameter.
53
*/
54
AEROSPIKE_ERR_PARAM
= -2,
55
56
/**
57
* Generic client API usage error.
58
*/
59
AEROSPIKE_ERR_CLIENT
= -1,
60
61
/**
62
* Deprecated. Generic client error. Keep for legacy reasons.
63
*/
64
AEROSPIKE_ERR
= -1,
65
66
/***************************************************************************
67
* Success
68
**************************************************************************/
69
70
/**
71
* Generic success.
72
*/
73
AEROSPIKE_OK
= 0,
74
75
/***************************************************************************
76
* Server Errors
77
**************************************************************************/
78
79
/**
80
* Generic error returned by server.
81
*/
82
AEROSPIKE_ERR_SERVER
= 1,
83
84
/**
85
* Record does not exist in database. May be returned by read, or write
86
* with policy AS_POLICY_EXISTS_UPDATE.
87
*/
88
AEROSPIKE_ERR_RECORD_NOT_FOUND
= 2,
89
90
/**
91
* Generation of record in database does not satisfy write policy.
92
*/
93
AEROSPIKE_ERR_RECORD_GENERATION
= 3,
94
95
/**
96
* Request protocol invalid, or invalid protocol field.
97
*/
98
AEROSPIKE_ERR_REQUEST_INVALID
= 4,
99
100
/**
101
* Record already exists. May be returned by write with policy
102
* AS_POLICY_EXISTS_CREATE.
103
*/
104
AEROSPIKE_ERR_RECORD_EXISTS
= 5,
105
106
/**
107
* Bin already exists.
108
*/
109
AEROSPIKE_ERR_BIN_EXISTS
= 6,
110
111
/**
112
* A cluster state change occurred during the request. This may also be
113
* returned by scan operations with the fail_on_cluster_change flag set.
114
*/
115
AEROSPIKE_ERR_CLUSTER_CHANGE
= 7,
116
117
/**
118
* The server node is running out of memory and/or storage device space
119
* reserved for the specified namespace.
120
*/
121
AEROSPIKE_ERR_SERVER_FULL
= 8,
122
123
/**
124
* Request timed out. Can be triggered by client or server.
125
*/
126
AEROSPIKE_ERR_TIMEOUT
= 9,
127
128
/**
129
* XDR is not available for the cluster.
130
*/
131
AEROSPIKE_ERR_NO_XDR
= 10,
132
133
/**
134
* Generic cluster discovery & connection error.
135
*/
136
AEROSPIKE_ERR_CLUSTER
= 11,
137
138
/**
139
* Bin modification operation can't be done on an existing bin due to its
140
* value type.
141
*/
142
AEROSPIKE_ERR_BIN_INCOMPATIBLE_TYPE
= 12,
143
144
/**
145
* Record being (re-)written can't fit in a storage write block.
146
*/
147
AEROSPIKE_ERR_RECORD_TOO_BIG
= 13,
148
149
/**
150
* Too may concurrent requests for one record - a "hot-key" situation.
151
*/
152
AEROSPIKE_ERR_RECORD_BUSY
= 14,
153
154
/**
155
* Scan aborted by user.
156
*/
157
AEROSPIKE_ERR_SCAN_ABORTED
= 15,
158
159
/**
160
* Sometimes our doc, or our customers wishes, get ahead of us. We may have
161
* processed something that the server is not ready for (unsupported feature).
162
*/
163
AEROSPIKE_ERR_UNSUPPORTED_FEATURE
= 16,
164
165
/**
166
* Bin-level replace-only supported on server but not on client.
167
*/
168
AEROSPIKE_ERR_BIN_NOT_FOUND
= 17,
169
170
/**
171
* The server node's storage device(s) can't keep up with the write load.
172
*/
173
AEROSPIKE_ERR_DEVICE_OVERLOAD
= 18,
174
175
/**
176
* Record key sent with transaction did not match key stored on server.
177
*/
178
AEROSPIKE_ERR_RECORD_KEY_MISMATCH
= 19,
179
180
/**
181
* Namespace in request not found on server.
182
*/
183
AEROSPIKE_ERR_NAMESPACE_NOT_FOUND
= 20,
184
185
/**
186
* Sent too-long bin name (should be impossible in this client) or exceeded
187
* namespace's bin name quota.
188
*/
189
AEROSPIKE_ERR_BIN_NAME
= 21,
190
191
/**
192
* Operation not allowed at this time.
193
*/
194
AEROSPIKE_ERR_FAIL_FORBIDDEN
= 22,
195
196
/**
197
* There are no more records left for query.
198
*/
199
AEROSPIKE_QUERY_END
= 50,
200
201
/**
202
* Security functionality not supported by connected server.
203
*/
204
AEROSPIKE_SECURITY_NOT_SUPPORTED
= 51,
205
206
/**
207
* Security functionality not enabled by connected server.
208
*/
209
AEROSPIKE_SECURITY_NOT_ENABLED
= 52,
210
211
/**
212
* Security type not supported by connected server.
213
*/
214
AEROSPIKE_SECURITY_SCHEME_NOT_SUPPORTED
= 53,
215
216
/**
217
* Administration command is invalid.
218
*/
219
AEROSPIKE_INVALID_COMMAND
= 54,
220
221
/**
222
* Administration field is invalid.
223
*/
224
AEROSPIKE_INVALID_FIELD
= 55,
225
226
/**
227
* Security protocol not followed.
228
*/
229
AEROSPIKE_ILLEGAL_STATE
= 56,
230
231
/**
232
* User name is invalid.
233
*/
234
AEROSPIKE_INVALID_USER
= 60,
235
236
/**
237
* User was previously created.
238
*/
239
AEROSPIKE_USER_ALREADY_EXISTS
= 61,
240
241
/**
242
* Password is invalid.
243
*/
244
AEROSPIKE_INVALID_PASSWORD
= 62,
245
246
/**
247
* Password has expired.
248
*/
249
AEROSPIKE_EXPIRED_PASSWORD
= 63,
250
251
/**
252
* Forbidden password (e.g. recently used)
253
*/
254
AEROSPIKE_FORBIDDEN_PASSWORD
= 64,
255
256
/**
257
* Security credential is invalid.
258
*/
259
AEROSPIKE_INVALID_CREDENTIAL
= 65,
260
261
/**
262
* Role name is invalid.
263
*/
264
AEROSPIKE_INVALID_ROLE
= 70,
265
266
/**
267
* Role already exists.
268
*/
269
AEROSPIKE_ROLE_ALREADY_EXISTS
= 71,
270
271
/**
272
* Privilege is invalid.
273
*/
274
AEROSPIKE_INVALID_PRIVILEGE
= 72,
275
276
/**
277
* User must be authentication before performing database operations.
278
*/
279
AEROSPIKE_NOT_AUTHENTICATED
= 80,
280
281
/**
282
* User does not possess the required role to perform the database operation.
283
*/
284
AEROSPIKE_ROLE_VIOLATION
= 81,
285
286
/**
287
* Generic UDF error.
288
*/
289
AEROSPIKE_ERR_UDF
= 100,
290
291
/**
292
* The requested item in a large collection was not found.
293
*/
294
AEROSPIKE_ERR_LARGE_ITEM_NOT_FOUND
= 125,
295
296
/**
297
* Batch functionality has been disabled.
298
*/
299
AEROSPIKE_ERR_BATCH_DISABLED
= 150,
300
301
/**
302
* Batch max requests have been exceeded.
303
*/
304
AEROSPIKE_ERR_BATCH_MAX_REQUESTS_EXCEEDED
= 151,
305
306
/**
307
* All batch queues are full.
308
*/
309
AEROSPIKE_ERR_BATCH_QUEUES_FULL
= 152,
310
311
/**
312
* Invalid/Unsupported GeoJSON
313
*/
314
AEROSPIKE_ERR_GEO_INVALID_GEOJSON
= 160,
315
316
/**
317
* Index found.
318
*/
319
AEROSPIKE_ERR_INDEX_FOUND
= 200,
320
321
/**
322
* Index not found
323
*/
324
AEROSPIKE_ERR_INDEX_NOT_FOUND
= 201,
325
326
/**
327
* Index is out of memory
328
*/
329
AEROSPIKE_ERR_INDEX_OOM
= 202,
330
331
/**
332
* Unable to read the index.
333
*/
334
AEROSPIKE_ERR_INDEX_NOT_READABLE
= 203,
335
336
/**
337
* Generic secondary index error.
338
*/
339
AEROSPIKE_ERR_INDEX
= 204,
340
341
/**
342
* Index name is too long.
343
*/
344
AEROSPIKE_ERR_INDEX_NAME_MAXLEN
= 205,
345
346
/**
347
* System already has maximum allowed indices.
348
*/
349
AEROSPIKE_ERR_INDEX_MAXCOUNT
= 206,
350
351
/**
352
* Query was aborted.
353
*/
354
AEROSPIKE_ERR_QUERY_ABORTED
= 210,
355
356
/**
357
* Query processing queue is full.
358
*/
359
AEROSPIKE_ERR_QUERY_QUEUE_FULL
= 211,
360
361
/**
362
* Secondary index query timed out on server.
363
*/
364
AEROSPIKE_ERR_QUERY_TIMEOUT
= 212,
365
366
/**
367
* Generic query error.
368
*/
369
AEROSPIKE_ERR_QUERY
= 213,
370
371
/***************************************************************************
372
* UDF OPERATIONS
373
**************************************************************************/
374
375
/**
376
* UDF does not exist.
377
*/
378
AEROSPIKE_ERR_UDF_NOT_FOUND
= 1301,
379
/**
380
* LUA file does not exist.
381
*/
382
AEROSPIKE_ERR_LUA_FILE_NOT_FOUND
= 1302,
383
384
/***************************************************************************
385
* Large Data Type (LDT) OPERATIONS
386
**************************************************************************/
387
388
/** Internal LDT error. */
389
AEROSPIKE_ERR_LDT_INTERNAL
= 1400,
390
391
/** LDT item not found */
392
AEROSPIKE_ERR_LDT_NOT_FOUND
= 1401,
393
394
/** Unique key violation: Duplicated item inserted when 'unique key" was set.*/
395
AEROSPIKE_ERR_LDT_UNIQUE_KEY
= 1402,
396
397
/** General error during insert operation. */
398
AEROSPIKE_ERR_LDT_INSERT
= 1403,
399
400
/** General error during search operation. */
401
AEROSPIKE_ERR_LDT_SEARCH
= 1404,
402
403
/** General error during delete operation. */
404
AEROSPIKE_ERR_LDT_DELETE
= 1405,
405
406
407
/** General input parameter error. */
408
AEROSPIKE_ERR_LDT_INPUT_PARM
= 1409,
409
410
// -------------------------------------------------
411
412
/** LDT Type mismatch for this bin. */
413
AEROSPIKE_ERR_LDT_TYPE_MISMATCH
= 1410,
414
415
/** The supplied LDT bin name is null. */
416
AEROSPIKE_ERR_LDT_NULL_BIN_NAME
= 1411,
417
418
/** The supplied LDT bin name must be a string. */
419
AEROSPIKE_ERR_LDT_BIN_NAME_NOT_STRING
= 1412,
420
421
/** The supplied LDT bin name exceeded the 14 char limit. */
422
AEROSPIKE_ERR_LDT_BIN_NAME_TOO_LONG
= 1413,
423
424
/** Internal Error: too many open records at one time. */
425
AEROSPIKE_ERR_LDT_TOO_MANY_OPEN_SUBRECS
= 1414,
426
427
/** Internal Error: Top Record not found. */
428
AEROSPIKE_ERR_LDT_TOP_REC_NOT_FOUND
= 1415,
429
430
/** Internal Error: Sub Record not found. */
431
AEROSPIKE_ERR_LDT_SUB_REC_NOT_FOUND
= 1416,
432
433
/** LDT Bin does not exist. */
434
AEROSPIKE_ERR_LDT_BIN_DOES_NOT_EXIST
= 1417,
435
436
/** Collision: LDT Bin already exists. */
437
AEROSPIKE_ERR_LDT_BIN_ALREADY_EXISTS
= 1418,
438
439
/** LDT control structures in the Top Record are damaged. Cannot proceed. */
440
AEROSPIKE_ERR_LDT_BIN_DAMAGED
= 1419,
441
442
// -------------------------------------------------
443
444
/** Internal Error: LDT Subrecord pool is damaged. */
445
AEROSPIKE_ERR_LDT_SUBREC_POOL_DAMAGED
= 1420,
446
447
/** LDT control structures in the Sub Record are damaged. Cannot proceed. */
448
AEROSPIKE_ERR_LDT_SUBREC_DAMAGED
= 1421,
449
450
/** Error encountered while opening a Sub Record. */
451
AEROSPIKE_ERR_LDT_SUBREC_OPEN
= 1422,
452
453
/** Error encountered while updating a Sub Record. */
454
AEROSPIKE_ERR_LDT_SUBREC_UPDATE
= 1423,
455
456
/** Error encountered while creating a Sub Record. */
457
AEROSPIKE_ERR_LDT_SUBREC_CREATE
= 1424,
458
459
/** Error encountered while deleting a Sub Record. */
460
AEROSPIKE_ERR_LDT_SUBREC_DELETE
= 1425,
461
462
/** Error encountered while closing a Sub Record. */
463
AEROSPIKE_ERR_LDT_SUBREC_CLOSE
= 1426,
464
465
/** Error encountered while updating a TOP Record. */
466
AEROSPIKE_ERR_LDT_TOPREC_UPDATE
= 1427,
467
468
/** Error encountered while creating a TOP Record. */
469
AEROSPIKE_ERR_LDT_TOPREC_CREATE
= 1428,
470
471
// -------------------------------------------------
472
473
/** The filter function name was invalid. */
474
AEROSPIKE_ERR_LDT_FILTER_FUNCTION_BAD
= 1430,
475
476
/** The filter function was not found. */
477
AEROSPIKE_ERR_LDT_FILTER_FUNCTION_NOT_FOUND
= 1431,
478
479
/** The function to extract the Unique Value from a complex object was invalid. */
480
AEROSPIKE_ERR_LDT_KEY_FUNCTION_BAD
= 1432,
481
482
/** The function to extract the Unique Value from a complex object was not found. */
483
AEROSPIKE_ERR_LDT_KEY_FUNCTION_NOT_FOUND
= 1433,
484
485
/** The function to transform an object into a binary form was invalid. */
486
AEROSPIKE_ERR_LDT_TRANS_FUNCTION_BAD
= 1434,
487
488
/** The function to transform an object into a binary form was not found. */
489
AEROSPIKE_ERR_LDT_TRANS_FUNCTION_NOT_FOUND
= 1435,
490
491
/** The function to untransform an object from binary form to live form was invalid. */
492
AEROSPIKE_ERR_LDT_UNTRANS_FUNCTION_BAD
= 1436,
493
494
/** The function to untransform an object from binary form to live form not found. */
495
AEROSPIKE_ERR_LDT_UNTRANS_FUNCTION_NOT_FOUND
= 1437,
496
497
/** The UDF user module name for LDT Overrides was invalid */
498
AEROSPIKE_ERR_LDT_USER_MODULE_BAD
= 1438,
499
500
/** The UDF user module name for LDT Overrides was not found */
501
AEROSPIKE_ERR_LDT_USER_MODULE_NOT_FOUND
= 1439
502
503
}
as_status
;
504
505
#ifdef __cplusplus
506
}
// end extern "C"
507
#endif