384 matches across 25 files for TODO
snippet_mode: auto · sorted by relevance
memcached.c C 36 matches · showing 5 view file →
527 event_base_set(c->thread->base, &c->event);
528
529 // TODO: call conn_cleanup/fail/etc
530 if (event_add(&c->event, 0) == -1) {
531 perror("event_add");
· · ·
535/* bring conn back from a sidethread. could have had its event base moved. */
536void conn_worker_readd(conn *c) {
537 assert(c->resps_suspended == 0); // TODO: remove assert.
538
539 switch (c->state) {
· · ·
559 case conn_parse_cmd:
560 // No-ops if we weren't in a suspended state to begin with
561 // TODO: which other states for this?
562 break;
563 default:
· · ·
996
997// Notes that an IOV should be handled as a chunked item header.
998// TODO: I'm hoping this isn't a permanent abstraction while I learn what the
999// API should be.
1000void resp_add_chunked_iov(mc_resp *resp, const void *buf, int len) {
· · ·
1179 mc_resp *next = resp->next;
1180 if (resp->item) {
1181 // TODO: cache hash value in resp obj?
1182 item_remove(resp->item);
1183 resp->item = NULL;
+ 31 more matches in this file
items.c C 16 matches · showing 5 view file →
94static lru_bump_buf *bump_buf_tail = NULL;
95static pthread_mutex_t bump_buf_lock = PTHREAD_MUTEX_INITIALIZER;
96/* TODO: tunable? Need bench results */
97#define LRU_BUMP_BUF_SIZE 8192
98
· · ·
101
102/* Get the next CAS id for a new item. */
103/* TODO: refactor some atomics for this. */
104uint64_t get_cas_id(void) {
105 pthread_mutex_lock(&cas_id_lock);
· · ·
207 */
208item_chunk *do_item_alloc_chunk(item_chunk *ch, const size_t bytes_remain) {
209 // TODO: Should be a cleaner way of finding real size with slabber calls
210 size_t size = bytes_remain + sizeof(item_chunk);
211 if (size > settings.slab_chunk_size_max)
· · ·
1252
1253
1254/* TODO: Third place this code needs to be deduped */
1255static void lru_bump_buf_link_q(lru_bump_buf *b) {
1256 pthread_mutex_lock(&bump_buf_lock);
· · ·
1307}
1308
1309/* TODO: Might be worth a micro-optimization of having bump buffers link
1310 * themselves back into the central queue when queue goes from zero to
1311 * non-zero, then remove from list if zero more than N times.
+ 11 more matches in this file
proxy_network.c C 19 matches · showing 5 view file →
64/* Helper routines common to io_uring and libevent modes */
65
66// TODO (v3): doing an inline syscall here, not ideal for uring mode.
67// leaving for now since this should be extremely uncommon.
68static int _beconn_send_validate(struct mcp_backendconn_s *be) {
· · ·
104
105 be->validating = true;
106 // TODO: make validation optional.
107
108 return 0;
· · ·
115 if (be->conncount != 1) {
116 int depth = INT_MAX;
117 // TODO: to computationally limit + ensure each connection stays
118 // somewhat warm:
119 // - remember idx of last conn used.
· · ·
328 int limit = be->tunables.backend_depth_limit;
329 if (bec->bad) {
330 // TODO: another counter for fast fails?
331 _proxy_flush_backend_queue(be);
332 continue;
· · ·
379#else
380 char buf[1];
381 // TODO (v2): This is a lot more fatal than it should be. can it fail? can
382 // it blow up the server?
383 // TODO (v2): a cross-platform method of speeding this up would be nice. With
+ 14 more matches in this file
proto_parser.c C 16 matches · showing 5 view file →
1// TODO: fix the include header nightmare.
2#include "memcached.h"
3#include "proto_parser.h"
· · ·
45 */
46
47// TODO: func to just get length of token
48static int _process_request_key(mcp_parser_t *pr) {
49 // TODO: can klen be int?
· · ·
49 // TODO: can klen be int?
50 int len = 0;
51 mcmc_token_get(pr->request, &pr->tok, pr->keytoken, &len);
· · ·
57// All meta commands are of form: "cm key f l a g S100"
58static int _process_request_meta(mcp_parser_t *pr) {
59 // TODO: can check result
60 mcmc_tokenize(pr->request, pr->reqlen, &pr->tok, 2);
61 if (pr->tok.ntokens < 2) {
· · ·
160}
161
162// TODO: return code ENUM with error types.
163int process_request(mcp_parser_t *pr, const char *command, size_t cmdlen) {
164 // we want to "parse in place" as much as possible, which allows us to
+ 11 more matches in this file
proxy_lua.c C 20 matches · showing 5 view file →
164 lua_pop(L, 1); // pop val or nil
165
166 // TODO: set a limit on 'every' so we don't have to worry about
167 // underflows. a year? a month?
168 if (lua_getfield(L, 2, "every") != LUA_TNIL) {
· · ·
252 if (bew->be != NULL) {
253 mcp_backend_t *be = bew->be;
254 // TODO (v3): technically a race where a backend could be created,
255 // queued, but not picked up before being gc'ed again. In practice
256 // this is impossible but at some point we should close the loop here.
· · ·
268#ifdef USE_EVENTFD
269 uint64_t u = 1;
270 // TODO (v2): check result? is it ever possible to get a short write/failure
271 // for an eventfd?
272 if (write(e->be_event_fd, &u, sizeof(uint64_t)) != sizeof(uint64_t)) {
· · ·
387 }
388
389 // TODO: allow a default port.
390 if (lua_getfield(L, 1, "port") != LUA_TNIL) {
391 port = luaL_checklstring(L, -1, &plen);
· · ·
437 lua_pop(L, 1);
438
439 // TODO (v2): print deprecation warning.
440 if (lua_getfield(L, 1, "retrytimeout") != LUA_TNIL) {
441 be->tunables.retry.tv_sec =
+ 15 more matches in this file
proxy_luafgen.c C 15 matches · showing 5 view file →
127}
128
129// TODO: switch from an array to a STAILQ so we can avoid the memory
130// management and error handling.
131// Realistically it's impossible for these to error so we're safe for now.
· · ·
386}
387
388// TODO: check rctx->awaiting before returning?
389// TODO: separate the "cleanup" portion from the "Return to cache" portion, so
390// we can call that directly for subrctx's
· · ·
389// TODO: separate the "cleanup" portion from the "Return to cache" portion, so
390// we can call that directly for subrctx's
391void mcp_funcgen_return_rctx(mcp_rcontext_t *rctx) {
· · ·
418 fgen->free_pressure = 0;
419 fgen->free_waiter.tv_sec = 0;
420 // TODO (perf): pre-create this c closure somewhere hidden.
421 lua_pushcclosure(L, _mcplib_funcgen_gencall, 0);
422 // pull in the funcgen object
· · ·
473 }
474
475 // TODO: could probably move a few more lines from proto_proxy into here,
476 // but that's splitting hairs.
477 WSTAT_INCR(fgen->thread, proxy_req_active, 1);
+ 10 more matches in this file
storage.c C 16 matches · showing 5 view file →
142
143// This callback runs in the IO thread.
144// TODO: Some or all of this should move to the
145// io_pending's callback back in the worker thread.
146// It might make sense to keep the crc32c check here though.
· · ·
153 bool miss = false;
154
155 // TODO: How to do counters for hit/misses?
156 if (ret < 1) {
157 miss = true;
· · ·
184 resp->skip = true;
185 } else {
186 // TODO: This should be movable to the worker thread.
187 // Convert the binprot response into a miss response.
188 // The header requires knowing a bunch of stateful crap, so rather
· · ·
214 if (resp->iov[0].iov_len >= 3
215 && memcmp(resp->iov[0].iov_base, "VA ", 3) == 0) {
216 // TODO: These miss translators should use specific callback
217 // functions attached to the io wrap. This is weird :(
218 resp->iovcnt = 1;
· · ·
236 } else {
237 assert(read_it->slabs_clsid != 0);
238 // TODO: should always use it instead of ITEM_data to kill more
239 // chunked special casing.
240 if ((read_it->it_flags & ITEM_CHUNKED) == 0) {
+ 11 more matches in this file
proxy_mutator.c C 21 matches · showing 5 view file →
217 if (lua_getfield(L, tidx, "cmd") != LUA_TNIL) {
218 lua_tolstring(L, -1, &len);
219 // TODO: know either exact max length or parse for valid commands
220 // this small sanity check should help against user error for now.
221 if (len > 20) {
· · ·
322}
323
324// TODO: validate a cmd is already slated to be set
325// NOTE: we might need to know the integer CMD because key position can move
326// with the stupid GAT command.
· · ·
355 p->slen = srq->pr.klen;
356 } else {
357 // TODO: if a result object:
358 // - if meta, and 'k' flag, copy flag token.
359 return -1;
· · ·
504}
505
506// TODO: pre-validate that it's an accepted code?
507mut_step_c(rescodeset) {
508 return _mut_check_strlen(L, tidx, "val");
· · ·
603}
604
605// TODO: can be no other steps after an error is set.
606// TODO: if idx given instead of msg copy an input string.
607mut_step_c(reserr) {
+ 16 more matches in this file
proto_text.c C 8 matches · showing 5 view file →
232 char *mid = NULL;
233
234 // TODO: move to another function.
235 if (!c->sasl_started) {
236 char *el, *st;
· · ·
758 // So we're just looking at dumping error codes and returning.
759 out_errstring(c, errstr);
760 // TODO: pass state in? else switching twice meh.
761 conn_set_state(c, conn_swallow);
762}
· · ·
918 return;
919 }
920 // TODO: settings needs an overhaul... no locks/etc.
921 settings.slab_automove_ratio = ratio;
922 settings.slab_automove_version++;
· · ·
958}
959
960/* TODO: decide on syntax for sampling? */
961static void process_watch_command(conn *c, mcp_parser_t *pr) {
962 uint16_t f = 0;
· · ·
1347 switch(rv) {
1348 case CRAWLER_OK:
1349 // TODO: documentation says this string is returned, but
1350 // it never was before. We never switch to conn_write so
1351 // this o_s call never worked. Need to talk to users and
+ 3 more matches in this file
proxy_request.c C 11 matches · showing 5 view file →
7mcp_request_t *mcp_new_request(lua_State *L, mcp_parser_t *pr, const char *command, size_t cmdlen) {
8 mcp_request_t *rq = lua_newuserdatauv(L, sizeof(mcp_request_t) + MCP_REQUEST_MAXLEN, 0);
9 // TODO (v2): memset only the non-data part? as the rest gets memcpy'd
10 // over.
11 memset(rq, 0, sizeof(mcp_request_t));
· · ·
39// We should not guarantee order when updating meta flags, which would allow
40// blanking tokens and appending new ones.
41// TODO (v2): much of the length is the key, avoid copying it.
42int mcp_request_render(mcp_request_t *rq, int idx, const char flag, const char *tok, size_t len) {
43 char temp[MCP_REQUEST_MAXLEN+1];
· · ·
93 int vlen = pr->vlen;
94
95 memset(pr, 0, sizeof(mcp_parser_t)); // TODO: required?
96 int ret = process_request(pr, rq->request, p - temp);
97 pr->vbuf = vbuf;
· · ·
133 int vlen = pr->vlen;
134
135 memset(pr, 0, sizeof(mcp_parser_t)); // TODO: required?
136 int ret = process_request(pr, rq->request, p - start);
137 pr->vbuf = vbuf;
· · ·
164
165// second argument is optional, for building set requests.
166// TODO: append the \r\n for the VAL?
167int mcplib_request(lua_State *L) {
168 LIBEVENT_THREAD *t = PROXY_GET_THR(L);
+ 6 more matches in this file
proto_proxy.c C 10 matches · showing 5 view file →
189 memset(counters, 0, sizeof(counters));
190
191 // TODO (v3): more globals to remove and/or change API method.
192 // aggregate worker thread counters.
193 for (int x = 0; x < settings.num_threads; x++) {
· · ·
308 APPEND_STAT(key_str, "%d", slots);
309 } else {
310 // TODO: It is safe to delete keys here. Slightly complex so low
311 // priority.
312 }
· · ·
460 luaL_openlibs(L);
461 proxy_register_libs(ctx, thr, L);
462 // TODO: srand on time? do we need to bother?
463 for (int x = 0; x < 3; x++) {
464 thr->proxy_rng[x] = rand();
· · ·
534#ifdef USE_EVENTFD
535 uint64_t u = 1;
536 // TODO (v2): check result? is it ever possible to get a short write/failure
537 // for an eventfd?
538 if (write(e->event_fd, &u, sizeof(uint64_t)) != sizeof(uint64_t)) {
· · ·
589void proxy_finalize_rctx_cb(io_pending_t *pending) {
590 io_pending_proxy_t *p = (io_pending_proxy_t *)pending;
591 // TODO: need to remove from stack if subtype is p->active
592
593 if (p->io_sub_type == IO_PENDING_TYPE_EXTSTORE) {
+ 5 more matches in this file
extstore.c C 10 matches · showing 5 view file →
19#include "extstore.h"
20
21// TODO: better if an init option turns this on/off.
22#ifdef EXTSTORE_DEBUG
23#define E_DEBUG(...) \
· · ·
145 pthread_mutex_lock(&e->mutex);
146 // find smallest queue. ignoring lock since being wrong isn't fatal.
147 // TODO: if average queue depth can be quickly tracked, can break as soon
148 // as we see a thread that's less than average, and start from last_io_thread
149 for (int x = 0; x < e->io_threadcount; x++) {
· · ·
254}
255
256// TODO: #define's for DEFAULT_BUCKET, FREE_VERSION, etc
257void *extstore_init(struct extstore_conf_file *fh, struct extstore_conf *cf,
258 enum extstore_res *res) {
· · ·
275 }
276
277 // TODO: More intelligence around alignment of flash erasure block sizes
278 if (cf->page_size % (1024 * 1024 * 2) != 0 ||
279 cf->wbuf_size % (1024 * 1024 * 2) != 0) {
· · ·
375 e->version = 1;
376
377 // scratch data for stats. TODO: malloc failure handle
378 e->stats.page_data =
379 calloc(e->page_count, sizeof(struct extstore_page_data));
+ 5 more matches in this file
slabs_mover.c C 8 matches · showing 5 view file →
43 void *storage; // extstore instance.
44 item *new_it; // memory for swapping out valid items.
45 // TODO: logger instance.
46 pthread_mutex_t lock;
47 pthread_cond_t cond;
· · ·
276 * the chunk for move. Only these two flags should exist.
277 */
278 // TODO: bad failure mode if MOVE_PASS and we decide to skip later
279 // but the item is actually alive for whatever reason.
280 // default to MOVE_BUSY and set MOVE_PASS explicitly if the item is S|F?
· · ·
381}
382
383// TODO: in order to rescue active chunked items we need to first do more work
384// on chunked items:
385// - individual chunks need to be refcounted, with refcounts protected by item
· · ·
411 // delete the item.
412 if (t->rebal.busy_loops > SLAB_MOVE_MAX_LOOPS) {
413 // TODO: add indicator for source of eviction
414 LOGGER_LOG(t->l, LOG_EVICTIONS, LOGGER_EVICTION, it);
415 STORAGE_delete(t->storage, it);
· · ·
647 * Sits waiting for a condition to jump off and shovel some memory about
648 */
649// TODO: add back the "max busy loops" and bail the page move
650static void *slab_rebalance_thread(void *arg) {
651 struct slab_rebal_thread *t = arg;
+ 3 more matches in this file
proxy_inspector.c C 6 matches · showing 5 view file →
38};
39
40// TODO: it might make more sense to flatten the structs into the ins_step
41// struct. It wouldn't take much more space if we can be careful with
42// alignment.
· · ·
199}
200
201// TODO: abstract out the token-position-finder
202static int mcp_inspector_sepkey_r(lua_State *L, struct mcp_inspector *ins, struct mcp_ins_step *s, void *arg) {
203 mcp_request_t *rq = arg;
· · ·
359}
360
361// TODO: flaguint variant?
362// still stuck as signed in lua but would reject signed tokens
363static int mcp_inspector_flagint_r(lua_State *L, struct mcp_inspector *ins, struct mcp_ins_step *s, void *arg) {
· · ·
407
408static int mcp_inspector_flagstr_i(lua_State *L, int tidx, int sc, struct mcp_inspector *ins) {
409 // TODO: if we never use mcp_ins_step we can remove it and just pass parts
410 // of the relevant structs down into these functions.
411 struct mcp_ins_step *s = &ins->steps[sc];
· · ·
545 // we now know the size and number of steps. allocate some flat memory.
546
547 // TODO: we need memory for steps + arbitrary step data. (ie; string stems
548 // and the like)
549 // - now: single extra malloc, divvy out the buffer as requested
+ 1 more matches in this file
logger.c C 9 matches · showing 5 view file →
26
27
28/* TODO: put this in a struct and ditch the global vars. */
29static logger *logger_stack_head = NULL;
30static logger *logger_stack_tail = NULL;
· · ·
336
337#ifdef PROXY
338// TODO (v2): the length caps here are all magic numbers. Haven't thought of
339// something yet that I like better.
340// Should at least make a define to the max log len (1024) and do some math
· · ·
591}
592
593/* TODO: genericize lists. would be nice to import queue.h if the impact is
594 * studied... otherwise can just write a local one.
595 */
· · ·
765 ret = logger_thread_parse_entry(e, ls, scratch, &scratch_len);
766 if (ret != LOGGER_PARSE_ENTRY_OK) {
767 /* TODO: stats counter */
768 fprintf(stderr, "LOGGER: Failed to parse log entry\n");
769 } else {
· · ·
912 useconds_t to_sleep = MIN_LOGGER_SLEEP;
913 L_DEBUG("LOGGER: Starting logger thread\n");
914 // TODO: If we ever have item references in the logger code, will need to
915 // ensure everything is dequeued before stopping the thread.
916 while (do_run_logger_thread) {
+ 4 more matches in this file
t/proxyfuncgen.lua LUA 13 matches · showing 5 view file →
205 return res
206 end
207 -- TODO: tally up responses and send summary for test.
208 end
209 say("found nothing")
· · ·
238 local res = rctx:res_any(t[1])
239
240 -- TODO: tally up the responses and return summary for test.
241 return res
242 end
· · ·
410 local count = arg.c
411
412 local todo = 0
413 local cb = function(res)
414 say("responses TODO: " .. todo)
· · ·
414 say("responses TODO: " .. todo)
415 todo = todo - 1
416 if todo == 0 then
· · ·
415 todo = todo - 1
416 if todo == 0 then
417 mcp.log("received all responses")
+ 8 more matches in this file
crawler.c C 5 matches view file →
37
38typedef void (*crawler_eval_func)(crawler_module_t *cm, item *it, uint32_t hv, int slab_cls);
39typedef int (*crawler_init_func)(crawler_module_t *cm, void *data); // TODO: init args?
40typedef void (*crawler_deinit_func)(crawler_module_t *cm); // TODO: extra args?
41typedef void (*crawler_doneclass_func)(crawler_module_t *cm, int slab_cls);
· · ·
40typedef void (*crawler_deinit_func)(crawler_module_t *cm); // TODO: extra args?
41typedef void (*crawler_doneclass_func)(crawler_module_t *cm, int slab_cls);
42typedef void (*crawler_finalize_func)(crawler_module_t *cm);
· · ·
117static pthread_cond_t lru_crawler_cond = PTHREAD_COND_INITIALIZER;
118#ifdef EXTSTORE
119/* TODO: pass this around */
120static void *storage;
121#endif
· · ·
574 crawls_persleep = settings.crawls_persleep;
575 } else if (!settings.lru_crawler_sleep) {
576 // TODO: only cycle lock every N?
577 pthread_mutex_unlock(&lru_crawler_lock);
578 pthread_mutex_lock(&lru_crawler_lock);
· · ·
701 crawls_persleep = settings.crawls_persleep;
702 } else if (!settings.lru_crawler_sleep) {
703 // TODO: only cycle lock every N?
704 pthread_mutex_unlock(&lru_crawler_lock);
705 pthread_mutex_lock(&lru_crawler_lock);
proxy_config.c C 7 matches · showing 5 view file →
1/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2// Functions related to the configuration management threads and VM
3// TODO (v2): move worker thread related code back out of here.
4
5#include "proxy.h"
· · ·
153}
154
155// TODO: only run routine if something changed.
156// This compacts all of the names for proxy user stats into a linear buffer,
157// which can save considerable CPU when emitting a large number of stats. It
· · ·
247 proxy_config_stats_prep(ctx);
248
249 // TODO (v2): create a temporary VM to test-load the worker code into.
250 // failing to load partway through the worker VM reloads can be
251 // critically bad if we're not careful about references.
· · ·
354
355// Thread handling the configuration reload sequence.
356// TODO (v2): get a logger instance.
357// TODO (v2): making this "safer" will require a few phases of work.
358// 1) JFDI
· · ·
357// TODO (v2): making this "safer" will require a few phases of work.
358// 1) JFDI
359// 2) "test VM" -> from config thread, test the worker reload portion.
+ 2 more matches in this file
thread.c C 7 matches · showing 5 view file →
230
231 // stop each side thread.
232 // TODO: Verify these all work if the threads are already stopped
233 stop_item_crawler_thread(CRAWLER_WAIT);
234 if (settings.verbose > 0)
· · ·
328}
329
330// TODO: Skip notify if queue wasn't empty?
331// - Requires cq_push() returning a "was empty" flag
332// - Requires event handling loop to pop the entire queue and work from that
· · ·
340 if (write(t->n.notify_event_fd, &u, sizeof(uint64_t)) != sizeof(uint64_t)) {
341 perror("failed writing to worker eventfd");
342 /* TODO: This is a fatal problem. Can it ever happen temporarily? */
343 }
344#else
· · ·
346 if (write(t->n.notify_send_fd, buf, 1) != 1) {
347 perror("Failed writing to notify pipe");
348 /* TODO: This is a fatal problem. Can it ever happen temporarily? */
349 }
350#endif
· · ·
493 thread_io_queue_add(me, IO_QUEUE_PROXY, settings.proxy_ctx, proxy_submit_cb);
494
495 // TODO: maybe register hooks to be called here from sub-packages? ie;
496 // extstore, TLS, proxy.
497 if (settings.proxy_enabled) {
+ 2 more matches in this file
restart.c C 6 matches · showing 5 view file →
21};
22
23// TODO: struct to hand back to caller.
24static int mmap_fd = 0;
25static void *mmap_base = NULL;
· · ·
65} restart_cb_ctx;
66
67// TODO: error string from cb?
68// - look for final line with checksum
69// - checksum entire file (up until final line)
· · ·
100 // callback here.
101 fprintf(stderr, "[restart] corrupt metadata file\n");
102 // TODO: this should probably just return -1 and skip the reuse.
103 abort();
104 }
· · ·
214}
215
216// TODO:
217// - rolling checksum along with the writes.
218// - write final line + checksum + byte count or w/e.
· · ·
233
234 // restrictive permissions for the metadata file.
235 // TODO: also for the mmap file eh? :P
236 mode_t oldmask = umask(~(S_IRUSR | S_IWUSR));
237 FILE *f = fopen(metafile, "w");
+ 1 more matches in this file
tls.c C 6 matches · showing 5 view file →
79 ERR_clear_error();
80 } else {
81 // TODO: ship full error to log stream? conn events?
82 // SYSCALL specifically means we need to check errno/strerror.
83 // Else we need to look at the main error stack.
· · ·
121 */
122
123// TODO: add int offset, and find the nth NID here.
124// or different function that accepts a string, then does etc?
125// Caller _must immediately_ use the string and not store the pointer.
· · ·
162static ssize_t ssl_read(conn *c, void *buf, size_t count) {
163 assert (c != NULL);
164 /* TODO : document the state machine interactions for SSL_read with
165 non-blocking sockets/ SSL re-negotiations
166 */
· · ·
242 // ssl_wbuf is pointing to the buffer allocated in the worker thread.
243 assert(c->ssl_wbuf);
244 // TODO: allocate a fix buffer in crawler/logger if they start using
245 // the sendmsg method. Also, set c->ssl_wbuf when the side thread
246 // start owning the connection and reset the pointer in
· · ·
261 break;
262 }
263 /* TODO : document the state machine interactions for SSL_write with
264 non-blocking sockets/ SSL re-negotiations
265 */
+ 1 more matches in this file
t/slabs-mover.t RAKU 7 matches · showing 5 view file →
82}
83
84# TODO: mc metric for automove runs so we can loop for that instead of blind
85# sleep.
86sub test_automove_window {
· · ·
107# NOTE: Can't validate reflocked items in an integration test since we leak
108# the memory and cannot de-ref an unlinked item.
109# TODO: test reflocked chunked items as well
110sub test_reflocked {
111 my $size = 9000;
· · ·
151 cmp_ok($stats_a->{slab_reassign_busy_items}, '>', $stats->{slab_reassign_busy_items}+500, "page mover busy");
152 is($stats_a->{slab_reassign_last_busy_status}, "busy_floating", "recorded busy status correctly");
153 # TODO: rescue counter is only updated after a page completes moving.
154 #cmp_ok($stats_a->{slab_reassign_rescues}, '>', $stats->{slab_reassign_rescues}+50, "page mover rescued data");
155 cmp_ok($stats_a->{slabs_moved}, '==', $stats->{slabs_moved}, "no page moved");
· · ·
157}
158
159# TODO: reflock some items so we hit the "expired but reflocked" path
160# TODO: use debugtime to move clock and avoid having to sleep.
161# - also so we can reflock some items without having a race condition by
· · ·
160# TODO: use debugtime to move clock and avoid having to sleep.
161# - also so we can reflock some items without having a race condition by
162# setting the expire time out a minute/hour.
+ 2 more matches in this file
proxy_tls.c C 12 matches · showing 5 view file →
27 }
28
29 // TODO: check for OpenSSL 1.1+ ? should be elsewhere in the code.
30 SSL_CTX *tctx = SSL_CTX_new(TLS_client_method());
31 if (tctx == NULL) {
· · ·
33 }
34
35 // TODO: make configurable like main cache server
36 SSL_CTX_set_min_proto_version(tctx, TLS1_3_VERSION);
37 // reduce memory consumption of idle backends.
· · ·
64 }
65
66 // TODO: This may need to be called multiple times to "properly" shutdown
67 // a session. However we only ever call this when a backend is dead or not
68 // in used anymore. Unclear if checking for WANT_READ|WRITE is worth
· · ·
86// already be connected.
87int mcp_tls_connect(struct mcp_backendconn_s *be) {
88 // TODO: check return code. can fail if BIO fails to alloc.
89 SSL_set_fd(be->ssl, mcmc_fd(be->client));
90
· · ·
91 // TODO:
92 // if the backend is changing TLS version or some similar issue, we will
93 // be unable to reconnect as the SSL object "Caches" some information
+ 7 more matches in this file
t/metaget.t RAKU 7 matches · showing 5 view file →
310 ok(get_flag($res, 'k') eq $tesuto, "key returned encoded");
311
312 # TODO: test k is returned properly from ms.
313 # validate the store data is smaller somehow?
314}
· · ·
494
495 # again, but succeed.
496 # TODO: the actual CAS command should work here too?
497 my $cas = get_flag($res, 'c');
498 print $sock "ms needwin 2 C$cas T120\r\nmu\r\n";
· · ·
661 like(scalar <$sock>, qr/^HD/, "mdelete'd key");
662
663 # TODO: decide on if we need an explicit flag for "if I fetched a stale
664 # value, does winning matter?
665 # I think it's probably fine. clients can always ignore the win, or we can
· · ·
690 ok($ttl > 0 && $ttl <= 30, "TTL wasn't modified");
691
692 # TODO: CAS too high?
693
694 note "do valid mset";
· · ·
791};
792
793# TODO: move wait_for_ext into Memcached.pm
794sub wait_for_ext {
795 my $sock = shift;
+ 2 more matches in this file
slabs.c C 3 matches view file →
97}
98
99// TODO: could this work with the restartable memory?
100// Docs say hugepages only work with private shm allocs.
101/* Function split out for better error path handling */
· · ·
473
474 // return the header object.
475 // TODO: This is in three places, here and in do_slabs_free().
476 it->prev = 0;
477 it->next = p->slots;
· · ·
543}
544
545/* TODO: slabs_available_chunks should grow up to encompass this.
546 * mem_flag is redundant with the other function.
547 */
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.