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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to