You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by cp...@apache.org on 2025/01/31 14:23:19 UTC
(solr) 01/02: make solr/modules/*/src/java compile (mostly)
This is an automated email from the ASF dual-hosted git repository.
cpoerschke pushed a commit to branch ishan/upgrade-to-lucene-10
in repository https://gitbox.apache.org/repos/asf/solr.git
commit f9c3af4340612d54d888558ebff4d6f3e56c8701
Author: Christine Poerschke <cp...@apache.org>
AuthorDate: Fri Jan 31 13:40:22 2025 +0000
make solr/modules/*/src/java compile (mostly)
---
.../src/java/org/apache/solr/gcs/GCSBackupRepository.java | 2 +-
.../java/org/apache/solr/hdfs/store/blockcache/BlockDirectory.java | 6 ++++--
.../src/java/org/apache/solr/s3/S3BackupRepository.java | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java b/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java
index f2b8867b1b8..3d176a5c3d2 100644
--- a/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java
+++ b/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java
@@ -344,7 +344,7 @@ public class GCSBackupRepository extends AbstractBackupRepository {
final BlobInfo blobInfo = BlobInfo.newBuilder(bucketName, blobName).build();
try (IndexInput input =
shouldVerifyChecksum
- ? sourceDir.openChecksumInput(sourceFileName, IOContext.READONCE)
+ ? sourceDir.openChecksumInput(sourceFileName)
: sourceDir.openInput(sourceFileName, IOContext.READONCE)) {
if (input.length() <= CodecUtil.footerLength()) {
throw new CorruptIndexException("file is too small:" + input.length(), input);
diff --git a/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/blockcache/BlockDirectory.java b/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/blockcache/BlockDirectory.java
index 75859bbdd97..ab2645e1c2d 100644
--- a/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/blockcache/BlockDirectory.java
+++ b/solr/modules/hdfs/src/java/org/apache/solr/hdfs/store/blockcache/BlockDirectory.java
@@ -324,12 +324,13 @@ public class BlockDirectory extends FilterDirectory implements ShutdownAwareDire
if (blockCacheFileTypes != null && !isCachableFile(name)) {
return false;
}
- switch (context.context) {
+ switch (context.context()) {
// depending on params, we don't cache on merges or when only reading once
case MERGE:
{
return cacheMerges;
}
+ /* TODO
case READ:
{
if (context.readOnce) {
@@ -338,6 +339,7 @@ public class BlockDirectory extends FilterDirectory implements ShutdownAwareDire
return true;
}
}
+ */
default:
{
return true;
@@ -355,7 +357,7 @@ public class BlockDirectory extends FilterDirectory implements ShutdownAwareDire
if (blockCacheFileTypes != null && !isCachableFile(name)) {
return false;
}
- switch (context.context) {
+ switch (context.context()) {
case MERGE:
{
// we currently don't cache any merge context writes
diff --git a/solr/modules/s3-repository/src/java/org/apache/solr/s3/S3BackupRepository.java b/solr/modules/s3-repository/src/java/org/apache/solr/s3/S3BackupRepository.java
index 29b6daffb55..23b1ed4c509 100644
--- a/solr/modules/s3-repository/src/java/org/apache/solr/s3/S3BackupRepository.java
+++ b/solr/modules/s3-repository/src/java/org/apache/solr/s3/S3BackupRepository.java
@@ -279,7 +279,7 @@ public class S3BackupRepository extends AbstractBackupRepository {
try (IndexInput indexInput =
shouldVerifyChecksum
- ? sourceDir.openChecksumInput(sourceFileName, IOContext.READONCE)
+ ? sourceDir.openChecksumInput(sourceFileName)
: sourceDir.openInput(sourceFileName, IOContext.READONCE)) {
if (indexInput.length() <= CodecUtil.footerLength()) {
throw new CorruptIndexException("file is too small:" + indexInput.length(), indexInput);