Skip to content

Conversation

keith-turner
Copy link
Contributor

The code for resolving which tserver or sserver to use for a scan was spread out across multiple methods responsible for executing a scan. Pulled the code to resolve which server to use into a single place in the code that executes a scan.

Also introduced a new class to represent the server and server type (sserver or tserver) used to process a scan.

These changes clean up two problems in the code. First the tablet server location class was being used to represent a scan server with a special string placed in the tserver session field. Second the decision to use a scan server was deeper in the scan code than error reporting code and the resulted in the need for an odd instance variable to remember that a scan server was used for error reporting. Removing these two problems makes the code easier to modify and maintain.

The code for resolving which tserver or sserver to use for a scan was
spread out across multiple methods responsible for executing a scan.
Pulled the code to resolve which server to use into a single place in
the code that executes a scan.

Also introduced a new class to represent the server and server type
(sserver or tserver) used to process a scan.

These changes clean up two problems in the code. First the tablet
server location class was being used to represent a scan server
with a special string placed in the tserver session field. Second
the decision to use a scan server was deeper in the scan code than
error reporting code and the resulted in the need for an odd
instance variable to remember that a scan server was used for error
reporting.  Removing these two problems makes the code easier to
modify and maintain.
@keith-turner
Copy link
Contributor Author

This PR pulls improvements out of #3143 into a standalone commit like #3271 did. Doing this because I will need to make different caching changes than #3143 did inorder to support on demand tables and the general improvements made in #3143 will support those changes.

@dlmarion
Copy link
Contributor

dlmarion commented Apr 5, 2023

This looks good to me. I kicked off a full IT build, I'm pretty sure that we have ITs that test the tserver fallback case where a scan server is not found and good coverage in the other ITs too.

@EdColeman
Copy link
Contributor

Should this start with the 2.1 branch?

@keith-turner
Copy link
Contributor Author

Should this start with the 2.1 branch?

I was wondering about that, its only a reorganization of the code. The pros I can think of for going to 2.1 are :

  • Makes it easier to maintain 2.1
  • Makes it easier to merge from 2.1 to 3

The only con I can think of is that these changes may introduce a bug in 2.1.

Are there any other pros or cons?

If this change were pulled back to 2.1 then would also want to pull #3273 back. There is also another simple change I was thinking of making in main. Wanted to rename the TabletLocator to TabletCache to reflect the changes that will be made in the elasticity branch to generalize the responsibility of the client side tablet cache. The reason I am making all of these changes in main is to make merging to the elasticity branch easier. I plan to make the actual changes to cache functionality to support ondemand tablets only in the elasticity branch. All of these prereq changes for that cahce changes will have been made in main. So would it make sense to make all of these prereq changes in 2.1 instead?

@ctubbsii
Copy link
Member

ctubbsii commented Apr 5, 2023

Given the quantity of the changes, I don't think it makes sense to make these prereq changes in 2.1. I'm not even sure they should go in 3.0... maybe 3.1 right after we release 3.0.

@keith-turner
Copy link
Contributor Author

I'm not even sure they should go in 3.0... maybe 3.1 right after we release 3.0.

I want to get these in sooner rather than later so I can build on them. If they do not go into main now, then they could go in the elasticity branch. I was thinking putting them in main may help ease merge conflicts from main to elasticity.

@keith-turner keith-turner changed the base branch from main to elasticity April 5, 2023 20:27
@ctubbsii
Copy link
Member

ctubbsii commented Apr 5, 2023

I'm not even sure they should go in 3.0... maybe 3.1 right after we release 3.0.

I want to get these in sooner rather than later so I can build on them. If they do not go into main now, then they could go in the elasticity branch. I was thinking putting them in main may help ease merge conflicts from main to elasticity.

I'm not really opposed to including it in 3.0. I was just expressing a bit of uncertainty, based on the size and not having a lot of understanding of the changes (yet). Based on the description of what it does, it seems reasonable to include sooner. Without having a lot of time to review in depth at the moment, I'm okay with either.

@keith-turner
Copy link
Contributor Author

This looks good to me. I kicked off a full IT build, I'm pretty sure that we have ITs that test the tserver fallback case where a scan server is not found and good coverage in the other ITs too.

OK I switched this to target the elasticity branch. I think its ok to merge there w/o a full IT, so I am going to merge this. Let me know if something does blow up the with the ITs though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants