-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[common][client] Fix metadata schema fetcher cache to use map instead…
… of list (#1328) * [common][client] Fix metadata schema fetcher cache to use map instead of list It seems the current schema cache implementation is prone to bugs if there are gaps in the cache or if the number of elements goes to double digits. This fixes it by using a map instead.
- Loading branch information
Showing
11 changed files
with
257 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
internal/venice-test-common/src/main/resources/valueSchema/NameV10.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"type" : "record", | ||
"name" : "nameRecord", | ||
"namespace" : "example.avro", | ||
"fields" : [ { | ||
"name" : "firstName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "lastName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "age", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "is", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "just", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "a", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "number", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}] | ||
} |
51 changes: 51 additions & 0 deletions
51
internal/venice-test-common/src/main/resources/valueSchema/NameV11.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"type" : "record", | ||
"name" : "nameRecord", | ||
"namespace" : "example.avro", | ||
"fields" : [ { | ||
"name" : "firstName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "lastName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "age", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "is", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "just", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "a", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "number", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "bro", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}] | ||
} |
27 changes: 27 additions & 0 deletions
27
internal/venice-test-common/src/main/resources/valueSchema/NameV7.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"type" : "record", | ||
"name" : "nameRecord", | ||
"namespace" : "example.avro", | ||
"fields" : [ { | ||
"name" : "firstName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "lastName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "age", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "is", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}] | ||
} |
33 changes: 33 additions & 0 deletions
33
internal/venice-test-common/src/main/resources/valueSchema/NameV8.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"type" : "record", | ||
"name" : "nameRecord", | ||
"namespace" : "example.avro", | ||
"fields" : [ { | ||
"name" : "firstName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "lastName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "age", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "is", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "just", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}] | ||
} |
39 changes: 39 additions & 0 deletions
39
internal/venice-test-common/src/main/resources/valueSchema/NameV9.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"type" : "record", | ||
"name" : "nameRecord", | ||
"namespace" : "example.avro", | ||
"fields" : [ { | ||
"name" : "firstName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "lastName", | ||
"type" : "string", | ||
"default" : "", | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, { | ||
"name" : "age", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "is", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "just", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}, | ||
{ | ||
"name" : "a", | ||
"type" : "int", | ||
"default" : -1, | ||
"custom_prop" : "custom_prop_value_2, custom_prop_value_1" | ||
}] | ||
} |