[ https://issues.apache.org/jira/browse/SOLR-4354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562690#comment-13562690 ]
Shalin Shekhar Mangar commented on SOLR-4354: --------------------------------------------- Amit, I don't complete understand the problem. bq. Slave now tries to pull from master B (has higher index version than slave but lower generation) Say, slave has generation G and version V and master(B) has a higher version V+1 but lower generation G-1. The code right now says: {code} boolean isFullCopyNeeded = IndexDeletionPolicyWrapper .getCommitTimestamp(commit) >= latestVersion - || commit.getGeneration() >= latestGeneration || forceReplication; {code} Since master's generation is lower than slave, a full copy will be forced here. Further, your patch has: {code} - || commit.getGeneration() >= latestGeneration || forceReplication; + || commit.getGeneration() >= latestGeneration || (commit.getGeneration() > latestGeneration) || forceReplication; {code} I don't see how that changes anything. The second condition on generation is redundant. Did I miss something? > Replication should perform full copy if slave's generation higher than > master's > ------------------------------------------------------------------------------- > > Key: SOLR-4354 > URL: https://issues.apache.org/jira/browse/SOLR-4354 > Project: Solr > Issue Type: Bug > Components: replication (java) > Affects Versions: 4.1 > Reporter: Amit Nithian > Fix For: 4.2 > > Attachments: SOLR-4354.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > We have dual masters each incrementally indexing from our MySQL database and > sit behind a virtual hostname in our load balancer. As such, it's possible > that the generation numbers between the masters for a given index are not in > sync. Slaves are configured to replicate from this virtual host (and pin > based on source/dest IP hash) so we can add and remove masters as necessary > (great for maintenance). > For the most part this works but we've seen the following happen: > * Slave has been pulling from master A > * Master A goes down for maint and now will pull from master B (which has a > lower generation number for some reason than master A). > * Slave now tries to pull from master B (has higher index version than slave > but lower generation). > * Slave downloads index files, moves them to the index/ directory but these > files are deleted during the doCommit() phase (looks like older generation > data is deleted). > * Index remains as-is and no change. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org