cameronlee314 commented on a change in pull request #1008: SAMZA-2174: Throw a
record too large exception for oversized records in changelog
URL: https://github.com/apache/samza/pull/1008#discussion_r289102617
##########
File path:
samza-kv/src/main/scala/org/apache/samza/storage/kv/BaseKeyValueStorageEngineFactory.scala
##########
@@ -90,9 +90,9 @@ trait BaseKeyValueStorageEngineFactory[K, V] extends
StorageEngineFactory[K, V]
var storePropertiesBuilder = new StoreProperties.StorePropertiesBuilder()
val accessLog = storageConfig.getAccessLogEnabled(storeName)
- val maxMessageSize =
storageConfig.getInt(StorageConfig.CHANGELOG_MAX_MSG_SIZE_BYTES,
StorageConfig.DEFAULT_CHANGELOG_MAX_MSG_SIZE_BYTES)
- val largeMessagesExpected =
storageConfig.getBoolean(StorageConfig.EXPECT_LARGE_MESSAGES,
StorageConfig.DEFAULT_EXPECT_LARGE_MESSAGES)
- val dropLargeMessage =
storageConfig.getBoolean(StorageConfig.DROP_LARGE_MESSAGES,
StorageConfig.DEFAULT_DROP_LARGE_MESSAGES)
+ val maxMessageSize =
storageConfigSubset.getInt(StorageConfig.CHANGELOG_MAX_MSG_SIZE_BYTES,
StorageConfig.DEFAULT_CHANGELOG_MAX_MSG_SIZE_BYTES)
Review comment:
Does `storageConfigSubset` have configs in this format? You are still
looking for format strings (i.e. strings with %s) in them in a config map, and
I don't think the config map will have those keys.
Do you have a test for this code? I'm pretty sure you would have caught this
bug if you had a test.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services