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