- Split the rpc handling functions (and thus, corresponding helper functions) in Coordinator Service into multiple logical groupings.
- CoordinatorTabletManager - manages tables, tabletMap
- createTable
- dropTable
- splitTablet
- getTableId
- getTabletMap
- reassignTabletOwnership
- CoordinatorServerManager - manages serverList
- enlistServer
- getServerList
- hintServerDown
- sendServerList
- setWill
- nothing extra (only call handlers)
- recoveryMasterFinished
- quiesce
- CoordinatorTabletManager - manages tables, tabletMap
- Think about how the functionality corresponding to each function gets spilt amongst different modules.
- All the rpc handlers - CoordinatorService
- Each handler:
- Receives / processes the rpc. - work1
- Then calls into the corresponding function residing in a separate module. - work2
- We will probably have another module, say CoordinatorServiceRecovery that does work workR
- Decide division of work between work1 and work2 (and similarly, between workR and work2). Options:
- work1 and workR function as dispatchers, real work done in work2.
- work1 - passes the rpc to the appropriate function for work2.
- workR - iterates over the log, passes each entry to the appropriate function for work2.
- work2 - does everything.
- Split according to the the recovery path.
- work1 - everything upto (and including) the first time a log is written to logcabin. This is the work that will be only ever done by the current leader (not the followers or the recovering leader).
- workR - iterates over the log, passes each entry to the appropriate function for work2.
- work2 - everything after work1.
- work1 and workR function as dispatchers, real work done in work2.
- Look at the above options from decision-hiding perspective:
- First option:
- Decisions wrt how the log is processed - workR.
- Decisions wrt how logging is done (what to write / when to write to log) - work2
- Decisions wrt implementation of the function (in all the cases) - work2.
- Problem: work1 doesn't seem to hide any decision
- Problem: Putting all the decisions in one module is probably not the answer to good decision-hiding.
- Second option:
- Decisions wrt how the log is processed - workR.
- Decisions wrt how logging is done (what to write / when to write to log) - work1 & work2
- Decisions wrt implementation of the function (in all the cases) - work1 & work2.
- Problem: The work seems to be split flow-wise, not major decision wise.
Manage space
Manage content
Integrations