summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2023-03-08 17:30:53 -0800
committerdormando <dormando@rydia.net>2023-03-11 18:19:23 -0800
commitc04701654413719d4abd7645c6d7b3fba4255e85 (patch)
treed415716c5ce3f9290c473bd5e82df4884bd5ab1d /thread.c
parentaef5b580a5b1528cd418433857adfd7a87f1b4e4 (diff)
downloadmemcached-c04701654413719d4abd7645c6d7b3fba4255e85.tar.gz
meta: N flag changes append/prepend. ms s flag.
Sending 's' flag to metaset now returns the size of the item stored. Useful if you want to know how large an append/prepended item now is. If the 'N' flag is supplied while in append/prepend mode, allows autovivifying (with exptime supplied from N) for append/prepend style keys that don't need headers created first.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index 3ca1da3..ee120fa 100644
--- a/thread.c
+++ b/thread.c
@@ -917,13 +917,13 @@ enum delta_result_type add_delta(LIBEVENT_THREAD *t, const char *key,
/*
* Stores an item in the cache (high level, obeys set/add/replace semantics)
*/
-enum store_item_type store_item(item *item, int comm, LIBEVENT_THREAD *t, uint64_t *cas, bool cas_stale) {
+enum store_item_type store_item(item *item, int comm, LIBEVENT_THREAD *t, int *nbytes, uint64_t *cas, bool cas_stale) {
enum store_item_type ret;
uint32_t hv;
hv = hash(ITEM_key(item), item->nkey);
item_lock(hv);
- ret = do_store_item(item, comm, t, hv, cas, cas_stale);
+ ret = do_store_item(item, comm, t, hv, nbytes, cas, cas_stale);
item_unlock(hv);
return ret;
}