Skip to content

Commit

Permalink
Bump Spring Boot from 3.3.4 to 3.3.5 (#9640)
Browse files Browse the repository at this point in the history
* Bump Spring Boot from 3.3.4 to 3.3.5
* Drop Spring Framework version override
* Minor cleanup of historical data ingest documentation
* Minor cleanup of `StreamFileWriter`

Signed-off-by: Steven Sheehy <[email protected]>
  • Loading branch information
steven-sheehy authored Oct 25, 2024
1 parent 3209f3a commit 41c3ac6
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 41 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ extra.apply {
set("nodeJsVersion", "18.18.0")
set("protobufVersion", "3.25.5")
set("reactorGrpcVersion", "1.2.4")
set("spring-framework.version", "6.1.14") // Temporary until next Spring Boot version
set("vertxVersion", "4.5.10")
set("tuweniVersion", "2.3.1")
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies {
implementation("org.openapitools:openapi-generator-gradle-plugin:7.9.0")
implementation("org.owasp:dependency-check-gradle:10.0.4")
implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:5.1.0.4882")
implementation("org.springframework.boot:spring-boot-gradle-plugin:3.3.4")
implementation("org.springframework.boot:spring-boot-gradle-plugin:3.3.5")
implementation("org.testcontainers:postgresql:1.20.2")
implementation("org.web3j:web3j-gradle-plugin:4.12.2")
}
Expand Down
61 changes: 27 additions & 34 deletions docs/importer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,50 +50,43 @@ inaccurate due to bugs, follow the steps below to re-run the migration to fix it
checksum: 2
```
### Historical Data Ingestion
## Historical Data Ingestion
The following resource allocation and configuration is recommended to speed up historical data ingestion. The importer
should be able to ingest one month's worth of mainnet data in less than 1.5 days.
1. Importer
### Importer
- Resource allocation
Run the importer with 4 vCPUs and 10 GB of heap. Configure the application.yml:
Run the importer with 4 vCPUs and 10 GB of heap.
- Configuration:
```yaml
hedera:
mirror:
importer:
downloader:
batchSize: 600
record:
frequency: 1ms
parser:
record:
entity:
redis:
enabled: false
frequency: 10ms
queueCapacity: 40
```
Note once the importer has caught up all data, please change the configuration to the default where applicable.
2. PostgreSQL Database
- Resource allocation
```yaml
hedera:
mirror:
importer:
downloader:
batchSize: 600
record:
frequency: 1ms
parser:
record:
entity:
redis:
enabled: false
frequency: 10ms
queueCapacity: 40
```
Run a PostgreSQL 16 instance with at least 4 vCPUs and 16 GB memory.
Note once the importer has caught up all data, it's recommend to change the configuration back to the default.
- Configuration:
### Database
Set the following parameters. Note the unit is kilobytes.
Run a PostgreSQL 16 instance with at least 4 vCPUs and 16 GB memory. Set the following parameters (note the unit is
kilobytes):
- max_wal_size = 8388608
- work_mem = 262144
```
max_wal_size = 8388608
work_mem = 262144
```

## Performance Tests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,20 @@ public void write(RecordFile recordFile, Collection<SigningConsensusNode> nodes)
var fileHash = fileDigest.digest();
var metadataHash = calculateMetadataHash(recordFile);
var filename = recordFile.getName();
var sidecarName = recordFile.getName().replace(".rcd.gz", "_01.rcd.gz");
var sidecarName = filename.replace(".rcd.gz", "_01.rcd.gz");
var base = properties.getStreamPath().resolve(TYPE.getPath());

for (var node : nodes) {
var nodePath = base.resolve(TYPE.getNodePrefix() + node.getNodeAccountId());
var recordFileFile = nodePath.resolve(filename).toFile();
var sidecarPath = nodePath.resolve(SIDECAR_FOLDER);
var sidecarFile = sidecarPath.resolve(sidecarName).toFile();
sidecarPath.toFile().mkdirs();

if (sidecar.bytes() != null) {
var sidecarPath = nodePath.resolve(SIDECAR_FOLDER);
var sidecarFile = sidecarPath.resolve(sidecarName).toFile();
sidecarPath.toFile().mkdirs();
FileUtils.writeByteArrayToFile(sidecarFile, sidecar.bytes());
}

var recordFileFile = nodePath.resolve(filename).toFile();
FileUtils.writeByteArrayToFile(recordFileFile, bytes);
writeSignature(node.getPrivateKey(), recordFileFile, fileHash, metadataHash);
}
Expand Down

0 comments on commit 41c3ac6

Please sign in to comment.