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

Sylvain Lebresne commented on CASSANDRA-12716:
----------------------------------------------

Attaching a patch for this below:
| [12716|https://github.com/pcmanus/cassandra/commits/12716] | 
[utests|http://cassci.datastax.com/job/pcmanus-12716-testall] | 
[dtests|http://cassci.datastax.com/job/pcmanus-12716-dtest] |

I've tried to be thorough removing any code I could find that was not necessary 
anymore assume we're only compatible with 3.0+. It's worth noting this remove 
about 5K lines of code, which is not nothing (the patch actually removes a net 
8K lines, but some of it is due to the removal of legacy test sstable; 5K is 
roughly where I was before I started removing those).

There is a first big commit that remove the bulk of the code, followed by a 
number of smaller/more specific removals. There is a few cleanups around the 
{{Descriptor}} class that are not strictly removal but that I kind of run into: 
I wanted to make sure we properly rejecting early old sstables, from which I 
figured the best/safest place was in {{Descriptor.fromFilename()}}, but the 
method and its used were a bit messy so I cleaned things up while at it.

As the description of this ticket and the NEWS entry of the last commit 
suggest, this assume we're ok making 3.x a mandatory step toward upgrade to 
4.0, and means 4.0 is unable to read _anything_ pre-3.0, which I think is ok.

A few minor technical points worth mentioning:
* when running tests locally, I ran into a weird race in 
{{RealTransactionsTest}} where some cleanup seems to be interfering with other 
part of the test. I'm not really familiar with the test, nor am I sure why the 
patch would change anything for this test, but the {{MockSchema.cleanup()}} 
seems to be the culprit and didn't seem really used by the test at all so 
removed it.
* One of the commits adds a call to {{SystemKeyspace.persistLocalMetadata()}} 
in {{CQLTester}}. That's actually the righ thing to do as before that we were 
running basicaly without the {{local}} system table being properly populated, 
and as some of the tests uses the java driver, said driver was not properly 
detecting the server version due to that, which made it read the old (pre-3.0) 
schema tables. This was wrong even before this patch but was a silent error so 
far and isn't anymore since thos legacy table have been entirely removed.



> Remove pre-3.0 compatibility code for 4.0
> -----------------------------------------
>
>                 Key: CASSANDRA-12716
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12716
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 4.0
>
>
> CASSANDRA-8099 make subsequent changes to internal formats so that we have 
> quite a bit of backward compatibility code a bit over the place. Due to that, 
> but also as a natural evolution, I believe we always had a tacit agreement 
> that 3.0/3.X would be a mandatory step on the upgrade to 4.X, so that we can 
> remove pre-3.0 compatibility (that is, we won't support going from any 2.x 
> release directly to 4.0, you'll have to upgrade to at least some 3.0 release 
> first).
> I think it's time to create the 4.0 branch and remove that pre-3.0 backward 
> compatibility code, which should clean code quite a bit, and that's the goal 
> of this issue.



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

Reply via email to