@@ -164,6 +164,8 @@ public DefaultMessageStore(final MessageStoreConfig messageStoreConfig, final Br
164
164
165
165
File file = new File (StorePathConfigHelper .getLockFile (messageStoreConfig .getStorePathRootDir ()));
166
166
MappedFile .ensureDirOK (file .getParent ());
167
+ MappedFile .ensureDirOK (getStorePathPhysic ());
168
+ MappedFile .ensureDirOK (getStorePathLogic ());
167
169
lockFile = new RandomAccessFile (file , "rw" );
168
170
}
169
171
@@ -779,8 +781,8 @@ public String getRunningDataInfo() {
779
781
return this .storeStatsService .toString ();
780
782
}
781
783
782
- private String getStorePathPhysic () {
783
- String storePathPhysic = "" ;
784
+ public String getStorePathPhysic () {
785
+ String storePathPhysic ;
784
786
if (DefaultMessageStore .this .getMessageStoreConfig ().isEnableDLegerCommitLog ()) {
785
787
storePathPhysic = ((DLedgerCommitLog )DefaultMessageStore .this .getCommitLog ()).getdLedgerServer ().getdLedgerConfig ().getDataStorePath ();
786
788
} else {
@@ -789,6 +791,10 @@ private String getStorePathPhysic() {
789
791
return storePathPhysic ;
790
792
}
791
793
794
+ public String getStorePathLogic () {
795
+ return StorePathConfigHelper .getStorePathConsumeQueue (this .messageStoreConfig .getStorePathRootDir ());
796
+ }
797
+
792
798
@ Override
793
799
public HashMap <String , String > getRuntimeInfo () {
794
800
HashMap <String , String > result = this .storeStatsService .getRuntimeInfo ();
@@ -807,9 +813,7 @@ public HashMap<String, String> getRuntimeInfo() {
807
813
}
808
814
809
815
{
810
- String storePathLogics = StorePathConfigHelper .getStorePathConsumeQueue (this .messageStoreConfig .getStorePathRootDir ());
811
- double logicsRatio = UtilAll .isPathExists (storePathLogics ) ?
812
- UtilAll .getDiskPartitionSpaceUsedPercent (storePathLogics ) : -1 ;
816
+ double logicsRatio = UtilAll .getDiskPartitionSpaceUsedPercent (getStorePathLogic ());
813
817
result .put (RunningStats .consumeQueueDiskRatio .name (), String .valueOf (logicsRatio ));
814
818
}
815
819
0 commit comments