Phillippko commented on code in PR #7969:
URL: https://github.com/apache/ignite-3/pull/7969#discussion_r3072259671
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/util/SharedLogStorageManagerUtils.java:
##########
@@ -41,36 +49,67 @@ public class SharedLogStorageManagerUtils {
* LOGIT_STORAGE_ENABLED_PROPERTY and fsync set to true.
*/
@TestOnly
- public static LogStorageManager create(String nodeName, Path
logStoragePath) {
- return create("test", nodeName, logStoragePath, true);
+ public static LogStorageManager create(String nodeName, Path
logStoragePath, LogStorageConfiguration logStorageConfig) {
+ return create("test", nodeName, logStoragePath, true,
logStorageConfig);
}
/**
* Creates a LogStorageManager with {@link DefaultLogStorageManager} or
{@link LogitLogStorageManager} implementation depending on
* LOGIT_STORAGE_ENABLED_PROPERTY.
*/
+ @TestOnly
public static LogStorageManager create(
String factoryName,
String nodeName,
Path logStoragePath,
- boolean fsync
+ boolean fsync,
+ LogStorageConfiguration logStorageConfig
) {
- return create(factoryName, nodeName, logStoragePath, fsync,
RocksDbLogStorageOptions.defaults());
+ return create(
+ factoryName,
+ nodeName,
+ logStoragePath,
+ fsync,
+ RocksDbLogStorageOptions.defaults(),
+ new SegmentLogStorageOptions(1, logStorageConfig, new
FailureManager(new NoOpFailureHandler()))
+ );
}
/**
- * Creates a LogStorageManager with {@link DefaultLogStorageManager} or
{@link LogitLogStorageManager} implementation depending on
- * LOGIT_STORAGE_ENABLED_PROPERTY.
+ * Creates a LogStorageManager with {@link SegmentLogStorageManager},
{@link DefaultLogStorageManager} or {@link LogitLogStorageManager}
+ * implementation depending on SEGSTORE_ENABLED_PROPERTY /
LOGIT_STORAGE_ENABLED_PROPERTY.
*/
public static LogStorageManager create(
String factoryName,
String nodeName,
Path logStoragePath,
boolean fsync,
- RocksDbLogStorageOptions specificOptions
+ RocksDbLogStorageOptions specificOptions,
+ SegmentLogStorageOptions segmentStoreSpecificOptions
Review Comment:
Discussed, separate method won't help because we need to support segstore
for all tests, so need to pass parameter always
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/util/SharedLogStorageManagerUtils.java:
##########
@@ -41,36 +49,67 @@ public class SharedLogStorageManagerUtils {
* LOGIT_STORAGE_ENABLED_PROPERTY and fsync set to true.
*/
@TestOnly
- public static LogStorageManager create(String nodeName, Path
logStoragePath) {
- return create("test", nodeName, logStoragePath, true);
+ public static LogStorageManager create(String nodeName, Path
logStoragePath, LogStorageConfiguration logStorageConfig) {
+ return create("test", nodeName, logStoragePath, true,
logStorageConfig);
}
/**
* Creates a LogStorageManager with {@link DefaultLogStorageManager} or
{@link LogitLogStorageManager} implementation depending on
* LOGIT_STORAGE_ENABLED_PROPERTY.
*/
+ @TestOnly
public static LogStorageManager create(
String factoryName,
String nodeName,
Path logStoragePath,
- boolean fsync
+ boolean fsync,
+ LogStorageConfiguration logStorageConfig
) {
- return create(factoryName, nodeName, logStoragePath, fsync,
RocksDbLogStorageOptions.defaults());
+ return create(
+ factoryName,
+ nodeName,
+ logStoragePath,
+ fsync,
+ RocksDbLogStorageOptions.defaults(),
+ new SegmentLogStorageOptions(1, logStorageConfig, new
FailureManager(new NoOpFailureHandler()))
+ );
}
/**
- * Creates a LogStorageManager with {@link DefaultLogStorageManager} or
{@link LogitLogStorageManager} implementation depending on
- * LOGIT_STORAGE_ENABLED_PROPERTY.
+ * Creates a LogStorageManager with {@link SegmentLogStorageManager},
{@link DefaultLogStorageManager} or {@link LogitLogStorageManager}
+ * implementation depending on SEGSTORE_ENABLED_PROPERTY /
LOGIT_STORAGE_ENABLED_PROPERTY.
*/
public static LogStorageManager create(
String factoryName,
String nodeName,
Path logStoragePath,
boolean fsync,
- RocksDbLogStorageOptions specificOptions
+ RocksDbLogStorageOptions specificOptions,
+ SegmentLogStorageOptions segmentStoreSpecificOptions
Review Comment:
added nullable, not adding separate method
--
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]