Skip to content

Commit e6dd11f

Browse files
committed
re-establish silently overwrite value when inserting
1 parent b4f2ed0 commit e6dd11f

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

dttools/src/itable.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,9 @@ double itable_load(struct itable *h)
131131
static int insert_to_buckets_aux(struct entry **buckets, int bucket_count, struct entry *new_entry)
132132
{
133133
unsigned index;
134-
struct entry *e;
135-
136134
index = new_entry->key % bucket_count;
137-
e = buckets[index];
138-
139-
while (e) {
140-
/* check that this key does not already exist in the table */
141-
if (new_entry->key == e->key) {
142-
return 0;
143-
}
144-
e = e->next;
145-
}
146135

136+
// Possible memory leak! Silently replacing value if it existed.
147137
new_entry->next = buckets[index];
148138
buckets[index] = new_entry;
149139
return 1;

dttools/src/itable.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ double itable_load(struct itable *h);
103103

104104

105105
/** Insert a key and value.
106-
This call will fail if the table already contains the same key.
107-
You must call @ref itable_remove to remove it.
106+
This call will replace the value if it already contains the same key.
108107
Also note that you cannot insert a null value into the table.
109108
@param h A pointer to an integer table.
110109
@param key An integer key

taskvine/test/TR_vine_task_graph_compat.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ PORT_FILE=vine.port
1414

1515
check_needed()
1616
{
17+
# disable for now...
18+
return 1
1719
[ -n "${CCTOOLS_PYTHON_TEST_EXEC}" ] || return 1
1820
"${CCTOOLS_PYTHON_TEST_EXEC}" -c "import cloudpickle; import dask" || return 1
1921

taskvine/test/vine_task_graph_compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def checkpoint(dag, key):
7878
f.memory = 2000
7979
f.max_workers = 1
8080
f.min_workers = 1
81+
f.ssl = True
8182
with f:
8283
desired_keys = ["t", "v"]
8384
desired_keys = list(dsk_graph.keys())

0 commit comments

Comments
 (0)