-
daviszhen authored
In previous design, there is not context.Context going through the frontend and the computation engine. In 0.6, the computation engine introduces the context.Context. So, I add the context.Context in the frontend and try to connect context.Context with modules -- metric and trace. I am not sure the usage of the conext.Context in these modules is right. So I propose the PR. The hierarchy of the context.Context: ``` rootCtx(context.Background) | | WithCancel() | | \|/ cancelMoServerCtx | | WithValue(configuration) | | moServerCtx | | ----------------------------> context in metric, trace | | \|/ cancelRoutineCtx (every network connection has an independent context) | | ------> WithCancel----->AuthenticateCtx (login authentication -- user, password, role) | | cancelRequestCtx (every request from the client has a new context) | | -------> WithCancel ------> LoadBatchCtx ( every batch has a independent context) ``` Approved by: @fengttt, @yingfeng, @aptend