Re: [HA-JDBC] Changing the weight of an active database
High-Availability JDBC
Brought to you by:
ferraro
From: Paul F. <pau...@ca...> - 2013-08-09 15:08:30
|
I agree - this is a valid use case. I don't foresee this logic causing any issues. We'd still want to set the dirty flag, I think, so that the change can be persisted back to the configuration file. Paul On Thu, Aug 8, 2013 at 3:24 PM, Steve Jones <ste...@eu...>wrote: > > In our usage of HA-JDBC we are using the simple balancer type to direct > requests to the node with the highest weight. > > At runtime nodes can be activated and deactivated and we want to be able > to change the node weights to direct traffic to the "primary" node. > > For example, we may start off with: > > Node A : weight 2 > Node B : weight 1 > > If node A is deactivated, we would want the nodes to be: > > Node B : weight 2 > > so any nodes activated subsequently will have lower weights. At the > moment we would have to deactivate B in order to change the weight. > > >From a very quick review it looks as though it is safe to change the > weight when active so I am wondering if this is a valid use case for > which I could submit a pull request. > > As far as implementation goes I assume that if the weight could be > changed when active then the dirty flag should not be set and the weight > field should be declared volatile. > > Thanks, > Steve > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk > _______________________________________________ > ha-jdbc-user mailing list > ha-...@li... > https://lists.sourceforge.net/lists/listinfo/ha-jdbc-user > |