Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Conversation

@hangc0276
Copy link
Collaborator

Changes

Bump pulsar to 2.8.0-rc-202104202206 and fix the incompatible interface.

@BewareMyPower BewareMyPower merged commit 5c91e8f into streamnative:master Apr 22, 2021
@hangc0276 hangc0276 self-assigned this Apr 25, 2021
BewareMyPower added a commit to BewareMyPower/kop that referenced this pull request May 6, 2022
Fixes streamnative#1272

### Motivation

streamnative#448 introduced a bug that the
compaction threshold was not set in metadata namespace.

```java
// NOTE: compactionThreshold is always null unless it has been configured
Long compactionThreshold = namespaces.getCompactionThreshold(kafkaMetadataNamespace);
if (compactionThreshold != null && compactionThreshold != MAX_COMPACTION_THRESHOLD) {
    // it never gets here unless compaction threshold has been configured
    namespaces.setCompactionThreshold(kafkaMetadataNamespace, MAX_COMPACTION_THRESHOLD);
}
```

In addition, currently there is no test that ensures the metadata has
been initialized correctly.

### Modifications

- Configure the compaction threshold when the metadata namespace is
  created. Since the policies could only be configured when the
  namespace didn't exist before, there is no need to check the existing
  policy.
- Add `MetadataInitTest` to test the metadata namespace has been
  configured correctly. It also verifies the
  `kafkaManageSystemNamespaces` config, which disables the
  initialization of the metadata namespace.
- Refactor the `internalSetup` method to avoid the redundant start of
  broker.
BewareMyPower added a commit to BewareMyPower/kop that referenced this pull request May 7, 2022
Fixes streamnative#1272

### Motivation

streamnative#448 introduced a bug that the
compaction threshold was not set in metadata namespace.

```java
// NOTE: compactionThreshold is always null unless it has been configured
Long compactionThreshold = namespaces.getCompactionThreshold(kafkaMetadataNamespace);
if (compactionThreshold != null && compactionThreshold != MAX_COMPACTION_THRESHOLD) {
    // it never gets here unless compaction threshold has been configured
    namespaces.setCompactionThreshold(kafkaMetadataNamespace, MAX_COMPACTION_THRESHOLD);
}
```

In addition, currently there is no test that ensures the metadata has
been initialized correctly.

### Modifications

- Configure the compaction threshold when the metadata namespace is
  created. Since the policies could only be configured when the
  namespace didn't exist before, there is no need to check the existing
  policy.
- Add `MetadataInitTest` to test the metadata namespace has been
  configured correctly. It also verifies the
  `kafkaManageSystemNamespaces` config, which disables the
  initialization of the metadata namespace.
- Refactor the `internalSetup` method to avoid the redundant start of
  broker.
BewareMyPower added a commit that referenced this pull request May 7, 2022
Fixes #1272

### Motivation

#448 introduced a bug that the
compaction threshold was not set in metadata namespace.

```java
// NOTE: compactionThreshold is always null unless it has been configured
Long compactionThreshold = namespaces.getCompactionThreshold(kafkaMetadataNamespace);
if (compactionThreshold != null && compactionThreshold != MAX_COMPACTION_THRESHOLD) {
    // it never gets here unless compaction threshold has been configured
    namespaces.setCompactionThreshold(kafkaMetadataNamespace, MAX_COMPACTION_THRESHOLD);
}
```

In addition, currently there is no test that ensures the metadata has
been initialized correctly.

### Modifications

- Configure the compaction threshold when the metadata namespace is
  created. Since the policies could only be configured when the
  namespace didn't exist before, there is no need to check the existing
  policy.
- Add `MetadataInitTest` to test the metadata namespace has been
  configured correctly. It also verifies the
  `kafkaManageSystemNamespaces` config, which disables the
  initialization of the metadata namespace.
- Refactor the `internalSetup` method to avoid the redundant start of
  broker.
BewareMyPower added a commit that referenced this pull request May 7, 2022
Fixes #1272

### Motivation

#448 introduced a bug that the
compaction threshold was not set in metadata namespace.

```java
// NOTE: compactionThreshold is always null unless it has been configured
Long compactionThreshold = namespaces.getCompactionThreshold(kafkaMetadataNamespace);
if (compactionThreshold != null && compactionThreshold != MAX_COMPACTION_THRESHOLD) {
    // it never gets here unless compaction threshold has been configured
    namespaces.setCompactionThreshold(kafkaMetadataNamespace, MAX_COMPACTION_THRESHOLD);
}
```

In addition, currently there is no test that ensures the metadata has
been initialized correctly.

### Modifications

- Configure the compaction threshold when the metadata namespace is
  created. Since the policies could only be configured when the
  namespace didn't exist before, there is no need to check the existing
  policy.
- Add `MetadataInitTest` to test the metadata namespace has been
  configured correctly. It also verifies the
  `kafkaManageSystemNamespaces` config, which disables the
  initialization of the metadata namespace.
- Refactor the `internalSetup` method to avoid the redundant start of
  broker.

(cherry picked from commit 82211b9)
BewareMyPower added a commit that referenced this pull request May 7, 2022
Fixes #1272

### Motivation

#448 introduced a bug that the
compaction threshold was not set in metadata namespace.

```java
// NOTE: compactionThreshold is always null unless it has been configured
Long compactionThreshold = namespaces.getCompactionThreshold(kafkaMetadataNamespace);
if (compactionThreshold != null && compactionThreshold != MAX_COMPACTION_THRESHOLD) {
    // it never gets here unless compaction threshold has been configured
    namespaces.setCompactionThreshold(kafkaMetadataNamespace, MAX_COMPACTION_THRESHOLD);
}
```

In addition, currently there is no test that ensures the metadata has
been initialized correctly.

### Modifications

- Configure the compaction threshold when the metadata namespace is
  created. Since the policies could only be configured when the
  namespace didn't exist before, there is no need to check the existing
  policy.
- Add `MetadataInitTest` to test the metadata namespace has been
  configured correctly. It also verifies the
  `kafkaManageSystemNamespaces` config, which disables the
  initialization of the metadata namespace.
- Refactor the `internalSetup` method to avoid the redundant start of
  broker.

(cherry picked from commit 82211b9)
BewareMyPower added a commit that referenced this pull request May 7, 2022
Fixes #1272

### Motivation

#448 introduced a bug that the
compaction threshold was not set in metadata namespace.

```java
// NOTE: compactionThreshold is always null unless it has been configured
Long compactionThreshold = namespaces.getCompactionThreshold(kafkaMetadataNamespace);
if (compactionThreshold != null && compactionThreshold != MAX_COMPACTION_THRESHOLD) {
    // it never gets here unless compaction threshold has been configured
    namespaces.setCompactionThreshold(kafkaMetadataNamespace, MAX_COMPACTION_THRESHOLD);
}
```

In addition, currently there is no test that ensures the metadata has
been initialized correctly.

### Modifications

- Configure the compaction threshold when the metadata namespace is
  created. Since the policies could only be configured when the
  namespace didn't exist before, there is no need to check the existing
  policy.
- Add `MetadataInitTest` to test the metadata namespace has been
  configured correctly. It also verifies the
  `kafkaManageSystemNamespaces` config, which disables the
  initialization of the metadata namespace.
- Refactor the `internalSetup` method to avoid the redundant start of
  broker.

(cherry picked from commit 82211b9)
eolivelli pushed a commit to datastax/starlight-for-kafka that referenced this pull request May 17, 2022
Fixes streamnative/kop#1272

streamnative/kop#448 introduced a bug that the
compaction threshold was not set in metadata namespace.

```java
// NOTE: compactionThreshold is always null unless it has been configured
Long compactionThreshold = namespaces.getCompactionThreshold(kafkaMetadataNamespace);
if (compactionThreshold != null && compactionThreshold != MAX_COMPACTION_THRESHOLD) {
    // it never gets here unless compaction threshold has been configured
    namespaces.setCompactionThreshold(kafkaMetadataNamespace, MAX_COMPACTION_THRESHOLD);
}
```

In addition, currently there is no test that ensures the metadata has
been initialized correctly.

- Configure the compaction threshold when the metadata namespace is
  created. Since the policies could only be configured when the
  namespace didn't exist before, there is no need to check the existing
  policy.
- Add `MetadataInitTest` to test the metadata namespace has been
  configured correctly. It also verifies the
  `kafkaManageSystemNamespaces` config, which disables the
  initialization of the metadata namespace.
- Refactor the `internalSetup` method to avoid the redundant start of
  broker.

(cherry picked from commit 82211b9)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants