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  * SUCCESS (all < 100)
30  **************************************************************************/
31 
32  /**
33  * Generic success.
34  */
36 
37  /***************************************************************************
38  * ERRORS (all < 100)
39  **************************************************************************/
40 
58 
59  /***************************************************************************
60  * ERRORS (all >= 100)
61  **************************************************************************/
62 
63  /**
64  * Generic error.
65  */
67 
68  /***************************************************************************
69  * CLIENT API USAGE
70  **************************************************************************/
71 
72  /**
73  * Generic client API usage error.
74  */
76 
77  /**
78  * Invalid client API parameter.
79  */
81 
82  /***************************************************************************
83  * CLUSTER DISCOVERY & CONNECTION
84  **************************************************************************/
85 
86  /**
87  * Generic cluster discovery & connection error.
88  */
90 
91  /***************************************************************************
92  * INCOMPLETE REQUESTS (i.e. NOT from server-returned error codes)
93  **************************************************************************/
94 
95  /**
96  * Request timed out.
97  */
99 
100  /**
101  * Request randomly dropped by client for throttling.
102  * @warning Not yet supported.
103  */
105 
106  /***************************************************************************
107  * COMPLETED REQUESTS (all >= 500, from server-returned error codes)
108  **************************************************************************/
109 
110  /**
111  * Generic error returned by server.
112  */
114 
115  /**
116  * Request protocol invalid, or invalid protocol field.
117  */
119 
120  /**
121  * Namespace in request not found on server.
122  */
124 
125  /**
126  * The server node is running out of memory and/or storage device space
127  * reserved for the specified namespace.
128  */
130 
131  /**
132  * A cluster state change occurred during the request. This may also be
133  * returned by scan operations with the fail_on_cluster_change flag set.
134  */
136 
137  /**
138  * Sometimes our doc, or our customers wishes, get ahead of us. We may have
139  * processed something that the server is not ready for (unsupported feature).
140  */
142 
143  /**
144  * The server node's storage device(s) can't keep up with the write load.
145  */
147 
148  /***************************************************************************
149  * RECORD-SPECIFIC
150  **************************************************************************/
151 
152  /**
153  * Generic record error.
154  */
156 
157  /**
158  * Too may concurrent requests for one record - a "hot-key" situation.
159  */
161 
162  /**
163  * Record does not exist in database. May be returned by read, or write
164  * with policy AS_POLICY_EXISTS_UPDATE.
165  * @warning AS_POLICY_EXISTS_UPDATE not yet supported.
166  */
168 
169  /**
170  * Record already exists. May be returned by write with policy
171  * AS_POLICY_EXISTS_CREATE.
172  */
174 
175  /**
176  * Generation of record in database does not satisfy write policy.
177  */
179 
180  /**
181  * Record being (re-)written can't fit in a storage write block.
182  */
184 
185  /**
186  * Bin modification operation can't be done on an existing bin due to its
187  * value type.
188  */
190 
191  /**
192  * Record key sent with transaction did not match key stored on server.
193  */
195 
196  /**
197  * Sent too-long bin name (should be impossible in this client) or exceeded
198  * namespace's bin name quota.
199  */
201 
202  /***************************************************************************
203  * XDR-SPECIFIC
204  **************************************************************************/
205 
206  /**
207  * XDR is not available for the cluster.
208  */
210 
211  /***************************************************************************
212  * SCAN OPERATIONS
213  **************************************************************************/
214 
215  /**
216  * Generic scan error.
217  */
219 
220  /**
221  * Scan aborted by user.
222  */
224 
225  /***************************************************************************
226  * QUERY OPERATIONS
227  **************************************************************************/
228 
229  /**
230  * Generic query error.
231  */
233 
234  /**
235  * Query was aborted.
236  */
238 
239  /**
240  * Query processing queue is full.
241  */
243 
244  /***************************************************************************
245  * SECONDARY INDEX OPERATIONS
246  **************************************************************************/
247 
248  /**
249  * Generic secondary index error.
250  */
252 
253  /**
254  * Index is out of memory
255  */
257 
258  /**
259  * Index not found
260  */
262 
263  /**
264  * Index found.
265  */
267 
268  /**
269  * Unable to read the index.
270  */
272 
273  /**
274  * Index name is too long.
275  */
277 
278  /**
279  * System already has maximum allowed indices.
280  */
282 
283  /***************************************************************************
284  * UDF OPERATIONS
285  **************************************************************************/
286 
287  /**
288  * Generic UDF error.
289  */
291 
292  /**
293  * UDF does not exist.
294  */
296  /**
297  * LUA file does not exist.
298  */
300 
301  /***************************************************************************
302  * Large Data Type (LDT) OPERATIONS
303  **************************************************************************/
304 
305  /** Internal LDT error. */
307 
308  /** LDT item not found */
310 
311  /** Unique key violation: Duplicated item inserted when 'unique key" was set.*/
313 
314  /** General error during insert operation. */
316 
317  /** General error during search operation. */
319 
320  /** General error during delete operation. */
322 
323 
324  /** General input parameter error. */
326 
327  // -------------------------------------------------
328 
329  /** LDT Type mismatch for this bin. */
331 
332  /** The supplied LDT bin name is null. */
334 
335  /** The supplied LDT bin name must be a string. */
337 
338  /** The supplied LDT bin name exceeded the 14 char limit. */
340 
341  /** Internal Error: too many open records at one time. */
343 
344  /** Internal Error: Top Record not found. */
346 
347  /** Internal Error: Sub Record not found. */
349 
350  /** LDT Bin does not exist. */
352 
353  /** Collision: LDT Bin already exists. */
355 
356  /** LDT control structures in the Top Record are damaged. Cannot proceed. */
358 
359  // -------------------------------------------------
360 
361  /** Internal Error: LDT Subrecord pool is damaged. */
363 
364  /** LDT control structures in the Sub Record are damaged. Cannot proceed. */
366 
367  /** Error encountered while opening a Sub Record. */
369 
370  /** Error encountered while updating a Sub Record. */
372 
373  /** Error encountered while creating a Sub Record. */
375 
376  /** Error encountered while deleting a Sub Record. */
378 
379  /** Error encountered while closing a Sub Record. */
381 
382  /** Error encountered while updating a TOP Record. */
384 
385  /** Error encountered while creating a TOP Record. */
387 
388  // -------------------------------------------------
389 
390  /** The filter function name was invalid. */
392 
393  /** The filter function was not found. */
395 
396  /** The function to extract the Unique Value from a complex object was invalid. */
398 
399  /** The function to extract the Unique Value from a complex object was not found. */
401 
402  /** The function to transform an object into a binary form was invalid. */
404 
405  /** The function to transform an object into a binary form was not found. */
407 
408  /** The function to untransform an object from binary form to live form was invalid. */
410 
411  /** The function to untransform an object from binary form to live form not found. */
413 
414  /** The UDF user module name for LDT Overrides was invalid */
416 
417  /** The UDF user module name for LDT Overrides was not found */
419 
420 } as_status;