diff options
| author | chenzizhan <[email protected]> | 2024-10-16 10:00:54 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-10-16 10:00:54 +0800 |
| commit | e5c869ccbb7e9357b987754dd605b96f660c133f (patch) | |
| tree | 4a99b82409e6ca0316b98cbf7e089dbf78721e17 /src/cells/hash_table.c | |
| parent | b36cea9c3dd7c386632c950cdfe392a329afc0b1 (diff) | |
Revert "Performance: Cache cell for repeatedly adding metrics to the same cell"
This reverts commit 652bccee18d8555232dc1679cfbe7bf677181c77.
Diffstat (limited to 'src/cells/hash_table.c')
| -rw-r--r-- | src/cells/hash_table.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cells/hash_table.c b/src/cells/hash_table.c index 362b563..255a3ef 100644 --- a/src/cells/hash_table.c +++ b/src/cells/hash_table.c @@ -115,7 +115,7 @@ int hash_table_add(struct hash_table *pthis, const char *key, size_t key_len, vo assert(item->dying); item->dying = false; pthis->current_cell_num++; - return 2; + return 1; } item = calloc(1, sizeof(struct entry)); @@ -126,7 +126,7 @@ int hash_table_add(struct hash_table *pthis, const char *key, size_t key_len, vo HASH_ADD_KEYPTR(hh, pthis->key_exdata_map, item->key, key_len, item); pthis->current_cell_num++; - return 2; + return 1; } void hash_table_set_exdata_schema(struct hash_table *pthis, exdata_new_cb new_fn, exdata_free_cb free_fn, exdata_merge_cb merge_fn, exdata_reset_cb reset_fn, exdata_copy_cb copy_fn) { |
