Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -776,30 +776,30 @@ class DynamicBrokerConfigTest {
verifyIncorrectRemoteCopyLagProps(
retentionMs = 1000L,
logLocalRetentionMs = -2L,
remoteCopyLagMs = 1001L,
logRemoteCopyLagMs = 1001L,
retentionBytes = 1000L,
logLocalRetentionBytes = -2L,
remoteCopyLagBytes = 100L
logRemoteCopyLagBytes = 100L
)

// remote copy lag bytes cannot exceed effective local retention bytes
verifyIncorrectRemoteCopyLagProps(
retentionMs = 1000L,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be renamed too ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muralibasani thanks for your reminder. make sense. Already update.

logLocalRetentionMs = -2L,
remoteCopyLagMs = 100L,
logRemoteCopyLagMs = 100L,
retentionBytes = 1000L,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  retentionMs = 1000L,
  logLocalRetentionMs = -2L,
  logRemoteCopyLagMs = 100L,
  
  retentionBytes = 1000L,
  logLocalRetentionBytes = -2L,
  logRemoteCopyLagBytes = 1001L
  @muralibasani  thanks for your comments. here should be right.
  they are two groups. each have 3 configure name.

logLocalRetentionBytes = -2L,
remoteCopyLagBytes = 1001L
logRemoteCopyLagBytes = 1001L
)

}

def verifyIncorrectRemoteCopyLagProps(retentionMs: Long,
logLocalRetentionMs: Long,
remoteCopyLagMs: Long,
logRemoteCopyLagMs: Long,
retentionBytes: Long,
logLocalRetentionBytes: Long,
remoteCopyLagBytes: Long): Unit = {
logRemoteCopyLagBytes: Long): Unit = {
val props = TestUtils.createBrokerConfig(0, port = 8181)
props.put(ServerLogConfigs.LOG_RETENTION_TIME_MILLIS_CONFIG, retentionMs.toString)
props.put(ServerLogConfigs.LOG_RETENTION_BYTES_CONFIG, retentionBytes.toString)
Expand All @@ -810,9 +810,9 @@ class DynamicBrokerConfigTest {

val newProps = new Properties()
newProps.put(RemoteLogManagerConfig.LOG_LOCAL_RETENTION_MS_PROP, logLocalRetentionMs.toString)
newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_MS_PROP, remoteCopyLagMs.toString)
newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_MS_PROP, logRemoteCopyLagMs.toString)
newProps.put(RemoteLogManagerConfig.LOG_LOCAL_RETENTION_BYTES_PROP, logLocalRetentionBytes.toString)
newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_BYTES_PROP, remoteCopyLagBytes.toString)
newProps.put(RemoteLogManagerConfig.LOG_REMOTE_COPY_LAG_BYTES_PROP, logRemoteCopyLagBytes.toString)
// validate default config
assertThrows(classOf[ConfigException], () => config.dynamicConfig.validate(newProps, perBrokerConfig = false))
// validate per broker config
Expand Down
Loading