Skip to content

Commit

Permalink
[cuebot] Fix PSQL Booking Next Frame RE word boundary match (#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
roulaoregan-spi authored Jul 6, 2022
1 parent 81a272a commit 8c2c4ac
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class DispatchQuery {
"AND layer.int_gpu_mem_min BETWEEN ? AND ? " +
"AND job_resource.int_cores + layer.int_cores_min < job_resource.int_max_cores " +
"AND job_resource.int_gpus + layer.int_gpus_min < job_resource.int_max_gpus " +
"AND host.str_tags ~* ('(?x)' || layer.str_tags) " +
"AND host.str_tags ~* ('(?x)' || layer.str_tags || '\\y') " +
"AND host.str_name = ? " +
"AND layer.pk_layer IN (" +
"SELECT " +
Expand Down Expand Up @@ -164,7 +164,7 @@ public class DispatchQuery {
"AND layer.int_gpus_min <= ? " +
"AND layer.int_gpu_mem_min BETWEEN ? AND ? " +
"AND job_resource.int_cores + layer.int_cores_min <= job_resource.int_max_cores " +
"AND host.str_tags ~* ('(?x)' || layer.str_tags) " +
"AND host.str_tags ~* ('(?x)' || layer.str_tags || '\\y') " +
"AND host.str_name = ? " +
") AS t1 ) AS t2 WHERE rank < ?";

Expand Down Expand Up @@ -368,7 +368,7 @@ private static final String replaceQueryForFifo(String query) {
"AND " +
"l.int_gpu_mem_min = ? " +
"AND " +
"h.str_tags ~* ('(?x)' || l.str_tags) " +
"h.str_tags ~* ('(?x)' || l.str_tags || '\\y') " +
"AND " +
"h.str_name = ? " +
"AND " +
Expand Down Expand Up @@ -471,7 +471,7 @@ private static final String replaceQueryForFifo(String query) {
"AND " +
"l.int_gpu_mem_min = ? " +
"AND " +
"h.str_tags ~* ('(?x)' || l.str_tags) " +
"h.str_tags ~* ('(?x)' || l.str_tags || '\\y') " +
"AND " +
"h.str_name = ? " +
"AND " +
Expand Down Expand Up @@ -593,7 +593,7 @@ private static final String replaceQueryForFifo(String query) {
"l.pk_layer " +
"FROM " +
"layer l " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags) AND h.str_name = ?) " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags || '\\y') AND h.str_name = ?) " +
"LEFT JOIN layer_limit ON layer_limit.pk_layer = l.pk_layer " +
"LEFT JOIN limit_record ON limit_record.pk_limit_record = layer_limit.pk_limit_record " +
"LEFT JOIN (" +
Expand Down Expand Up @@ -711,7 +711,7 @@ private static final String replaceQueryForFifo(String query) {
"l.pk_layer " +
"FROM " +
"layer l " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags) AND h.str_name = ?) " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags || '\\y') AND h.str_name = ?) " +
"LEFT JOIN layer_limit ON layer_limit.pk_layer = l.pk_layer " +
"LEFT JOIN limit_record ON limit_record.pk_limit_record = layer_limit.pk_limit_record " +
"LEFT JOIN (" +
Expand Down Expand Up @@ -1045,7 +1045,7 @@ private static final String replaceQueryForFifo(String query) {
"l.pk_layer " +
"FROM " +
"layer l " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags) AND h.str_name = ?) " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags || '\\y') AND h.str_name = ?) " +
"LEFT JOIN layer_limit ON layer_limit.pk_layer = l.pk_layer " +
"LEFT JOIN limit_record ON limit_record.pk_limit_record = layer_limit.pk_limit_record " +
"LEFT JOIN (" +
Expand Down Expand Up @@ -1163,7 +1163,7 @@ private static final String replaceQueryForFifo(String query) {
"l.pk_layer " +
"FROM " +
"layer l " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags) AND h.str_name = ?) " +
"JOIN host h ON (h.str_tags ~* ('(?x)' || l.str_tags || '\\y') AND h.str_name = ?) " +
"LEFT JOIN layer_limit ON layer_limit.pk_layer = l.pk_layer " +
"LEFT JOIN limit_record ON limit_record.pk_limit_record = layer_limit.pk_limit_record " +
"LEFT JOIN (" +
Expand Down

0 comments on commit 8c2c4ac

Please sign in to comment.