I think SQL parse and route to shadow datasource is a better option for
using threadlocal. Because of threadlocal only can be used in to
sharding-jdbc, the SQL parser way can use into sharding-jdbc
and sharding-proxy together, is it?

------------------

Liang Zhang (John)
Apache ShardingSphere & Dubbo


Zhiyi Yan <[email protected]> 于2019年12月3日周二 下午9:52写道:

> Thanks for you suggestion, it is a good idea!
>
> [email protected] <[email protected]> 于2019年12月3日周二 下午4:56写道:
>
> > Yes, it is a good design.
> > I have a suggestion, mailing list can not display picture, how about
> paste
> > the picture in to github issue?
> >
> > ------------------
> >
> > Liang Zhang (John)
> > Apache ShardingSphere & Dubbo
> >
> >
> > Zhiyi Yan <[email protected]> 于2019年12月3日周二 上午11:08写道:
> >
> > > Hi ShardingSphere community,
> > >
> > > We are going to add a new feature - shadow database, this feature is
> > > designed to allow dirty data to be written to the shadow database when
> > > applying the online environment for pressure measurement,  the relevant
> > > issue is :
> > > https://github.com/apache/incubator-shardingsphere/issues/3269
> > >
> > > We want to do this through SQL parse and add router, add a tag field in
> > > sql, and according to this field, route to shadow database.
> > >
> > > Here is a simple design,and we chose the second way.  because
> ThreadLocal
> > > might introduce other problems.
> > >
> > > [image: sharding-shadow.png]
> > >
> > > Comments or Suggestions on this design are welcome!
> > >
> > > Thanks!
> > > --
> > > Zhiyi Yan (Zhyee)
> > > Apache ShardingSphere
> > >
> >
>
>
> --
> Zhiyi Yan (Zhyee)
> Apache ShardingSphere
>

Reply via email to