Siddhi-agg commented on code in PR #4208:
URL: https://github.com/apache/gobblin/pull/4208#discussion_r4091028332
##########
gobblin-metastore/src/main/java/org/apache/gobblin/metastore/MysqlJobStatusStateStore.java:
##########
@@ -68,7 +68,8 @@ public MysqlJobStatusStateStore(DataSource dataSource, String
stateStoreTableNam
* @throws IOException in case of failures
*/
public List<T> getAll(String storeName, long flowExecutionId) throws
IOException {
- return getAll(storeName, flowExecutionId + "%",
JobStateSearchColumns.TABLE_NAME_ONLY);
+ return getAll(storeName, flowExecutionId +
ServiceConfigKeys.STATE_STORE_KEY_SEPARATION_CHARACTER + "%",
+ JobStateSearchColumns.TABLE_NAME_ONLY);
}
Review Comment:
The underlying query here is `WHERE store_name = ? AND table_name LIKE ?` .
`store_name` is an exact match, so there's no cross-flow leakage. Within a
store, ` . ` is a literal in SQL LIKE (only `% ` and `_` are wildcards), so
`1234.%` is a strict subset of `1234%` . The change can therefore only
remove rows, never add them and the only rows it removes are ones belonging to
a different execution ( `12340.* `, `12345.* `), which were being returned
incorrectly before.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]