Skip to content

Commit

Permalink
[DSM] Don't send null tags with data streams checkpoint (#4349)
Browse files Browse the repository at this point in the history
  • Loading branch information
hokitam authored Nov 29, 2022
1 parent 152085b commit 914cfcf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ public void setCheckpoint(

for (Map.Entry<String, String> entry : sortedTags.entrySet()) {
String tag = TagsProcessor.createTag(entry.getKey(), entry.getValue());
if (tag == null) {
continue;
}
if (hashableTagKeys.contains(entry.getKey())) {
pathwayHashBuilder.addTag(tag);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ private static Map<String, Function<String, String>> createTagToPrefixMap() {
return result;
}

// Creates the tag string using the provided tagKey and tagValue.
// Returns null if either tagKey or tagValue is null.
public static String createTag(String tagKey, String tagValue) {
if (tagKey == null || tagValue == null) {
return null;
}
DDCache<String, String> cache = TAG_TO_CACHE.get(tagKey);
Function<String, String> prefix = TAG_TO_PREFIX.get(tagKey);
if (cache != null && prefix != null) {
Expand Down

0 comments on commit 914cfcf

Please sign in to comment.