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