mirror of https://github.com/apache/lucene.git
SOLR-8359: Restrict child classes from using parent logger's state
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1718257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ceb66d34c0
commit
b8a2745d94
|
@ -234,6 +234,9 @@ Other Changes
|
|||
|
||||
* SOLR-8313: SimpleQueryParser doesn't use MultiTermAnalysis for Fuzzy Queries (Tom Hill via Erick Erickson)
|
||||
|
||||
* SOLR-8359: Restrict child classes from using parent logger's state
|
||||
(Jason Gerlowski, Mike Drob, Anshum Gupta)
|
||||
|
||||
================== 5.4.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
|
||||
|
|
|
@ -48,6 +48,7 @@ public class CdcrTransactionLog extends TransactionLog {
|
|||
long startVersion; // (absolute) version of the first element of this transaction log
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
private static boolean debug = log.isDebugEnabled();
|
||||
|
||||
CdcrTransactionLog(File tlogFile, Collection<String> globalStrings) {
|
||||
super(tlogFile, globalStrings);
|
||||
|
|
|
@ -64,6 +64,7 @@ public class CdcrUpdateLog extends UpdateLog {
|
|||
public static String LOG_FILENAME_PATTERN = "%s.%019d.%1d";
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
private static boolean debug = log.isDebugEnabled();
|
||||
|
||||
@Override
|
||||
public void init(UpdateHandler uhandler, SolrCore core) {
|
||||
|
|
|
@ -59,6 +59,8 @@ import org.slf4j.LoggerFactory;
|
|||
*/
|
||||
public class HdfsTransactionLog extends TransactionLog {
|
||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
private static boolean debug = log.isDebugEnabled();
|
||||
private static boolean trace = log.isTraceEnabled();
|
||||
|
||||
|
||||
Path tlogFile;
|
||||
|
|
|
@ -52,6 +52,7 @@ public class HdfsUpdateLog extends UpdateLog {
|
|||
private Integer tlogDfsReplication;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
private static boolean debug = log.isDebugEnabled();
|
||||
|
||||
// used internally by tests to track total count of failed tran log loads in init
|
||||
public static AtomicLong INIT_FAILED_LOGS_COUNT = new AtomicLong();
|
||||
|
@ -350,6 +351,12 @@ public class HdfsUpdateLog extends UpdateLog {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preSoftCommit(CommitUpdateCommand cmd) {
|
||||
debug = log.isDebugEnabled();
|
||||
super.preSoftCommit(cmd);
|
||||
}
|
||||
|
||||
public String[] getLogList(Path tlogDir) throws FileNotFoundException, IOException {
|
||||
final String prefix = TLOG_NAME+'.';
|
||||
FileStatus[] files = fs.listStatus(tlogDir, new PathFilter() {
|
||||
|
|
|
@ -59,7 +59,7 @@ import static org.apache.solr.update.processor.DistributingUpdateProcessorFactor
|
|||
/** @lucene.experimental */
|
||||
public class PeerSync {
|
||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
public boolean debug = log.isDebugEnabled();
|
||||
private static boolean debug = log.isDebugEnabled();
|
||||
|
||||
private List<String> replicas;
|
||||
private int nUpdates;
|
||||
|
|
|
@ -64,8 +64,8 @@ import org.slf4j.LoggerFactory;
|
|||
*/
|
||||
public class TransactionLog {
|
||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
final boolean debug = log.isDebugEnabled();
|
||||
final boolean trace = log.isTraceEnabled();
|
||||
private static boolean debug = log.isDebugEnabled();
|
||||
private static boolean trace = log.isTraceEnabled();
|
||||
|
||||
public final static String END_MESSAGE="SOLR_TLOG_END";
|
||||
|
||||
|
|
|
@ -77,8 +77,8 @@ public class UpdateLog implements PluginInfoInitialized {
|
|||
public static String TLOG_NAME="tlog";
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
public boolean debug = log.isDebugEnabled();
|
||||
public boolean trace = log.isTraceEnabled();
|
||||
private static boolean debug = log.isDebugEnabled();
|
||||
private static boolean trace = log.isTraceEnabled();
|
||||
|
||||
// TODO: hack
|
||||
public FileSystem getFs() {
|
||||
|
|
Loading…
Reference in New Issue