Skip to content

Commit

Permalink
CCBC-466: Remove lcb_get_last_error
Browse files Browse the repository at this point in the history
Change-Id: If6104917c7e5caf4e53dbf66b2b6fca97304ca14
Reviewed-on: http://review.couchbase.org/100437
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Ellis Breen <ellis.breen@couchbase.com>
  • Loading branch information
avsej committed Jan 21, 2019
1 parent 728c223 commit 220216d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
6 changes: 6 additions & 0 deletions RELEASE_NOTES.markdown
Expand Up @@ -19,6 +19,12 @@

Migration path: the application should use `lcb_bootstrap_callback` instead.

* [CCBC-466](https://issues.couchbase.com/browse/CCBC-466): Removed `lcb_get_last_error`. This function is deprecated
and its use can result in false positives, true negatives. Most internals do not set `last_error`, and because there
may be multiple things going on within the library, getting the last error does not make sense.

Migration path: only arguments/fields in operation and bootstrap callbacks should be used.

## 2.10.3 (December 20 2018)

* [CCBC-1008](https://issues.couchbase.com/browse/CCBC-1008): jsoncpp: use
Expand Down
11 changes: 0 additions & 11 deletions include/libcouchbase/deprecated.h
Expand Up @@ -55,17 +55,6 @@ LCB_DEPR_API2(void lcb_set_view_timeout(lcb_t instance, lcb_uint32_t usec),
LCB_DEPR_API2(lcb_uint32_t lcb_get_view_timeout(lcb_t instance),
"Use LCB_CNTL_VIEW_TIMEOUT");

/**
* @deprecated Do not use this function. Check the error code of the specific operation
* to determine if something succeeded or not. Because the library has many
* asynchronous "flows" of control, determining the "last error" is not very
* fruitful. Since most API calls are themselves only schedule-related, they cannot
* possibly derive a "Real" error either
*/
LCB_DEPR_API2(lcb_error_t lcb_get_last_error(lcb_t instance),
"This function does not returning meaningful information. Use the operation callbacks "
"and/or bootstrap callbacks");

/** @deprecated This function does nothing */
LCB_DEPR_API2(void lcb_flush_buffers(lcb_t instance, const void *cookie),
"This function does nothing");
Expand Down
3 changes: 0 additions & 3 deletions src/legacy.c
Expand Up @@ -322,9 +322,6 @@ lcb_behavior_get_syncmode(lcb_t instance)
return LCBT_SETTING(instance, syncmode);
}

LIBCOUCHBASE_API
lcb_error_t lcb_get_last_error(lcb_t instance){return instance->last_error;}

LIBCOUCHBASE_API
lcb_error_t lcb__create_compat_230(lcb_cluster_t type, const void *specific, lcb_t *instance, struct lcb_io_opt_st *io)
{
Expand Down

0 comments on commit 220216d

Please sign in to comment.