Github user francisco-perez-sorrosal commented on a diff in the pull request:

    https://github.com/apache/incubator-omid/pull/3#discussion_r73977302
  
    --- Diff: tso-server/src/main/java/org/apache/omid/tso/DisruptorModule.java 
---
    @@ -18,14 +18,38 @@
     package org.apache.omid.tso;
     
     import com.google.inject.AbstractModule;
    +import com.google.inject.name.Names;
    +import com.lmax.disruptor.BlockingWaitStrategy;
    +import com.lmax.disruptor.BusySpinWaitStrategy;
    +import com.lmax.disruptor.WaitStrategy;
     
     import javax.inject.Singleton;
     
     public class DisruptorModule extends AbstractModule {
     
    +    private final TSOServerConfig config;
    +
    +    public DisruptorModule(TSOServerConfig config) {
    +        this.config = config;
    +    }
    +
         @Override
         protected void configure() {
    -
    +        switch (config.getWaitStrategyEnum()) {
    +        // A low-cpu usage Disruptor configuration for using in local/test 
environments
    +        case LOW_CPU:
    +             
bind(WaitStrategy.class).annotatedWith(Names.named("PersistenceStrategy")).to(BlockingWaitStrategy.class);
    +             
bind(WaitStrategy.class).annotatedWith(Names.named("ReplyStrategy")).to(BlockingWaitStrategy.class);
    +             
bind(WaitStrategy.class).annotatedWith(Names.named("RetryStrategy")).to(BlockingWaitStrategy.class);
    --- End diff --
    
    I've realized that this should be a `YieldingWaitStrategy` according to the 
current code (see below). So this should be:
    
    ```
      
bind(WaitStrategy.class).annotatedWith(Names.named("RetryStrategy")).to(YieldingWaitStrategy.class);
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to