All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  */
36 
37  /**
38  * Generic client API usage error.
39  */
41 
42  /**
43  * Deprecated. Generic client error. Keep for legacy reasons.
44  */
46 
47  /***************************************************************************
48  * Success
49  **************************************************************************/
50 
51  /**
52  * Generic success.
53  */
55 
56  /***************************************************************************
57  * Server Errors
58  **************************************************************************/
59 
60  /**
61  * Generic error returned by server.
62  */
64 
65  /**
66  * Record does not exist in database. May be returned by read, or write
67  * with policy AS_POLICY_EXISTS_UPDATE.
68  */
70 
71  /**
72  * Generation of record in database does not satisfy write policy.
73  */
75 
76  /**
77  * Request protocol invalid, or invalid protocol field.
78  */
80 
81  /**
82  * Record already exists. May be returned by write with policy
83  * AS_POLICY_EXISTS_CREATE.
84  */
86 
87  /**
88  * Bin already exists.
89  */
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  */
97 
98  /**
99  * The server node is running out of memory and/or storage device space
100  * reserved for the specified namespace.
101  */
103 
104  /**
105  * Request timed out. Can be triggered by client or server.
106  */
108 
109  /**
110  * XDR is not available for the cluster.
111  */
113 
114  /**
115  * Generic cluster discovery & connection error.
116  */
118 
119  /**
120  * Bin modification operation can't be done on an existing bin due to its
121  * value type.
122  */
124 
125  /**
126  * Record being (re-)written can't fit in a storage write block.
127  */
129 
130  /**
131  * Too may concurrent requests for one record - a "hot-key" situation.
132  */
134 
135  /**
136  * Scan aborted by user.
137  */
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  */
145 
146  /**
147  * Bin-level replace-only supported on server but not on client.
148  */
150 
151  /**
152  * The server node's storage device(s) can't keep up with the write load.
153  */
155 
156  /**
157  * Record key sent with transaction did not match key stored on server.
158  */
160 
161  /**
162  * Namespace in request not found on server.
163  */
165 
166  /**
167  * Sent too-long bin name (should be impossible in this client) or exceeded
168  * namespace's bin name quota.
169  */
171 
172  /**
173  * There are no more records left for query.
174  */
176 
177  /**
178  * Security functionality not supported by connected server.
179  */
181 
182  /**
183  * Security functionality not enabled by connected server.
184  */
186 
187  /**
188  * Security type not supported by connected server.
189  */
191 
192  /**
193  * Administration command is invalid.
194  */
196 
197  /**
198  * Administration field is invalid.
199  */
201 
202  /**
203  * Security protocol not followed.
204  */
206 
207  /**
208  * User name is invalid.
209  */
211 
212  /**
213  * User was previously created.
214  */
216 
217  /**
218  * Password is invalid.
219  */
221 
222  /**
223  * Password has expired.
224  */
226 
227  /**
228  * Forbidden password (e.g. recently used)
229  */
231 
232  /**
233  * Security credential is invalid.
234  */
236 
237  /**
238  * Role name is invalid.
239  */
241 
242  /**
243  * Privilege is invalid.
244  */
246 
247  /**
248  * User must be authentication before performing database operations.
249  */
251 
252  /**
253  * User does not possess the required role to perform the database operation.
254  */
256 
257  /**
258  * Generic UDF error.
259  */
261 
262  /**
263  * The requested item in a large collection was not found.
264  */
266 
267  /**
268  * Index found.
269  */
271 
272  /**
273  * Index not found
274  */
276 
277  /**
278  * Index is out of memory
279  */
281 
282  /**
283  * Unable to read the index.
284  */
286 
287  /**
288  * Generic secondary index error.
289  */
291 
292  /**
293  * Index name is too long.
294  */
296 
297  /**
298  * System already has maximum allowed indices.
299  */
301 
302  /**
303  * Query was aborted.
304  */
306 
307  /**
308  * Query processing queue is full.
309  */
311 
312  /**
313  * Secondary index query timed out on server.
314  */
316 
317  /**
318  * Generic query error.
319  */
321 
322  /***************************************************************************
323  * UDF OPERATIONS
324  **************************************************************************/
325 
326  /**
327  * UDF does not exist.
328  */
330  /**
331  * LUA file does not exist.
332  */
334 
335  /***************************************************************************
336  * Large Data Type (LDT) OPERATIONS
337  **************************************************************************/
338 
339  /** Internal LDT error. */
341 
342  /** LDT item not found */
344 
345  /** Unique key violation: Duplicated item inserted when 'unique key" was set.*/
347 
348  /** General error during insert operation. */
350 
351  /** General error during search operation. */
353 
354  /** General error during delete operation. */
356 
357 
358  /** General input parameter error. */
360 
361  // -------------------------------------------------
362 
363  /** LDT Type mismatch for this bin. */
365 
366  /** The supplied LDT bin name is null. */
368 
369  /** The supplied LDT bin name must be a string. */
371 
372  /** The supplied LDT bin name exceeded the 14 char limit. */
374 
375  /** Internal Error: too many open records at one time. */
377 
378  /** Internal Error: Top Record not found. */
380 
381  /** Internal Error: Sub Record not found. */
383 
384  /** LDT Bin does not exist. */
386 
387  /** Collision: LDT Bin already exists. */
389 
390  /** LDT control structures in the Top Record are damaged. Cannot proceed. */
392 
393  // -------------------------------------------------
394 
395  /** Internal Error: LDT Subrecord pool is damaged. */
397 
398  /** LDT control structures in the Sub Record are damaged. Cannot proceed. */
400 
401  /** Error encountered while opening a Sub Record. */
403 
404  /** Error encountered while updating a Sub Record. */
406 
407  /** Error encountered while creating a Sub Record. */
409 
410  /** Error encountered while deleting a Sub Record. */
412 
413  /** Error encountered while closing a Sub Record. */
415 
416  /** Error encountered while updating a TOP Record. */
418 
419  /** Error encountered while creating a TOP Record. */
421 
422  // -------------------------------------------------
423 
424  /** The filter function name was invalid. */
426 
427  /** The filter function was not found. */
429 
430  /** The function to extract the Unique Value from a complex object was invalid. */
432 
433  /** The function to extract the Unique Value from a complex object was not found. */
435 
436  /** The function to transform an object into a binary form was invalid. */
438 
439  /** The function to transform an object into a binary form was not found. */
441 
442  /** The function to untransform an object from binary form to live form was invalid. */
444 
445  /** The function to untransform an object from binary form to live form not found. */
447 
448  /** The UDF user module name for LDT Overrides was invalid */
450 
451  /** The UDF user module name for LDT Overrides was not found */
453 
454 } as_status;