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