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