Skip to content

Commit 90654e5

Browse files
committed
store: Remove unneeded feature flag
GRAPH_DISABLE_ERROR_FOR_TOPLEVEL_PARENTS was added as a safety mechanism, but never needed.
1 parent 6033965 commit 90654e5

File tree

2 files changed

+6
-24
lines changed

2 files changed

+6
-24
lines changed

graph/src/env/store.rs

-8
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ pub struct EnvVarsStore {
8686
/// Setting this to `0` disables pipelined writes, and writes will be
8787
/// done synchronously.
8888
pub write_queue_size: usize,
89-
90-
/// This is just in case new behavior causes issues. This can be removed
91-
/// once the new behavior has run in the hosted service for a few days
92-
/// without issues.
93-
pub disable_error_for_toplevel_parents: bool,
9489
}
9590

9691
// This does not print any values avoid accidentally leaking any sensitive env vars
@@ -127,7 +122,6 @@ impl From<InnerStore> for EnvVarsStore {
127122
connection_min_idle: x.connection_min_idle,
128123
connection_idle_timeout: Duration::from_secs(x.connection_idle_timeout_in_secs),
129124
write_queue_size: x.write_queue_size,
130-
disable_error_for_toplevel_parents: x.disable_error_for_toplevel_parents.0,
131125
}
132126
}
133127
}
@@ -171,6 +165,4 @@ pub struct InnerStore {
171165
connection_idle_timeout_in_secs: u64,
172166
#[envconfig(from = "GRAPH_STORE_WRITE_QUEUE", default = "5")]
173167
write_queue_size: usize,
174-
#[envconfig(from = "GRAPH_DISABLE_ERROR_FOR_TOPLEVEL_PARENTS", default = "false")]
175-
disable_error_for_toplevel_parents: EnvVarBoolean,
176168
}

store/postgres/src/relational_queries.rs

+6-16
Original file line numberDiff line numberDiff line change
@@ -500,22 +500,12 @@ impl EntityData {
500500
if key == "g$parent_id" {
501501
match &parent_type {
502502
None => {
503-
if ENV_VARS.store.disable_error_for_toplevel_parents {
504-
// Only temporarily in case reporting an
505-
// error causes unexpected trouble. Can
506-
// be removed once it's been working for
507-
// a few days
508-
let value =
509-
T::Value::from_column_value(&ColumnType::String, json)?;
510-
out.insert_entity_data("g$parent_id".to_owned(), value);
511-
} else {
512-
// A query that does not have parents
513-
// somehow returned parent ids. We have no
514-
// idea how to deserialize that
515-
return Err(graph::constraint_violation!(
516-
"query unexpectedly produces parent ids"
517-
));
518-
}
503+
// A query that does not have parents
504+
// somehow returned parent ids. We have no
505+
// idea how to deserialize that
506+
return Err(graph::constraint_violation!(
507+
"query unexpectedly produces parent ids"
508+
));
519509
}
520510
Some(parent_type) => {
521511
let value = T::Value::from_column_value(parent_type, json)?;

0 commit comments

Comments
 (0)