[ 
https://issues.apache.org/jira/browse/SOLR-6465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15245896#comment-15245896
 ] 

Dennis Gove commented on SOLR-6465:
-----------------------------------

The tweaks were very small but they do change visibility of some things.

1. in CdcrTransactionLog, close() is changed from protected to public.
2. in TransactionLog, log and debug are changed from private to protected
3. in UpdateLog, log and debug are changed from private to protected

full diff of changes is below. If we're comfortable with the visibility changes 
I'd be happy to add them to SOLR-6273.

{code}
diff --git a/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java 
b/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java
index f800f6f..e706733 100644
--- a/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java
+++ b/solr/core/src/java/org/apache/solr/update/CdcrTransactionLog.java
@@ -193,7 +193,7 @@ public class CdcrTransactionLog extends TransactionLog {
   }

   @Override
-  protected void close() {
+  public void close() {
     try {
       if (debug) {
         log.debug("Closing tlog" + this);
diff --git a/solr/core/src/java/org/apache/solr/update/TransactionLog.java 
b/solr/core/src/java/org/apache/solr/update/TransactionLog.java
index c8b8332..35020be 100644
--- a/solr/core/src/java/org/apache/solr/update/TransactionLog.java
+++ b/solr/core/src/java/org/apache/solr/update/TransactionLog.java
@@ -63,8 +63,8 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class TransactionLog implements Closeable {
-  private static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-  private static boolean debug = log.isDebugEnabled();
+  protected static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  protected static boolean debug = log.isDebugEnabled();
   private static boolean trace = log.isTraceEnabled();

   public final static String END_MESSAGE="SOLR_TLOG_END";
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateLog.java 
b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
index c5dc9a4..ad05d5f 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateLog.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateLog.java
@@ -75,8 +75,8 @@ public class UpdateLog implements PluginInfoInitialized {
   public static String LOG_FILENAME_PATTERN = "%s.%019d";
   public static String TLOG_NAME="tlog";

-  private static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-  private static boolean debug = log.isDebugEnabled();
+  protected static final Logger log = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  protected static boolean debug = log.isDebugEnabled();
   private static boolean trace = log.isTraceEnabled();

   // TODO: hack
{code}

> CDCR: fall back to whole-index replication when tlogs are insufficient
> ----------------------------------------------------------------------
>
>                 Key: SOLR-6465
>                 URL: https://issues.apache.org/jira/browse/SOLR-6465
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Yonik Seeley
>         Attachments: SOLR-6465.patch, SOLR-6465.patch
>
>
> When the peer-shard doesn't have transaction logs to forward all the needed 
> updates to bring a peer up to date, we need to fall back to normal 
> replication.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to