You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "dosubot[bot] (via GitHub)" <gi...@apache.org> on 2024/07/19 10:24:58 UTC
Re: [I] [refact] The pdconfig property in LogMeta and PartitionMeta is redundant [incubator-hugegraph]
dosubot[bot] commented on issue #2597:
URL: https://github.com/apache/incubator-hugegraph/issues/2597#issuecomment-2238854275
<!-- Answer -->
Yes, the `pdconfig` property in the `LogMeta` and `PartitionMeta` classes is indeed redundant, given that it is already defined in the `MetadataRocksDBStore` class. This redundancy should be refactored to improve the code design.
Supporting evidence from the provided code:
- The `PartitionMeta` class extends `MetadataRocksDBStore` and already has a `pdConfig` property.
- The `PartitionMeta` constructor initializes the `pdConfig` property by calling `super(pdConfig)` and then assigns it to `this.pdConfig`.
```java
public class PartitionMeta extends MetadataRocksDBStore {
private final PDConfig pdConfig;
public PartitionMeta(PDConfig pdConfig) {
super(pdConfig);
this.pdConfig = pdConfig;
// Additional initialization code
}
}
```
Since `MetadataRocksDBStore` already has the `pdConfig` property, having it again in `LogMeta` and `PartitionMeta` is unnecessary and should be refactored <sup>[[1]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-pd/hg-pd-core/src/main/java/org/apache/hugegraph/pd/meta/StoreInfoMeta.java)</sup><sup>[[2]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-pd/hg-pd-core/src/main/java/org/apache/hugegraph/pd/meta/PartitionMeta.java)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
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.
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org