[ 
https://issues.apache.org/jira/browse/STORM-1419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085076#comment-15085076
 ] 

ASF GitHub Bot commented on STORM-1419:
---------------------------------------

Github user satishd commented on a diff in the pull request:

    https://github.com/apache/storm/pull/977#discussion_r48931925
  
    --- Diff: 
external/storm-solr/src/main/java/org/apache/storm/solr/bolt/SolrUpdateBolt.java
 ---
    @@ -92,11 +94,19 @@ private void ack(Tuple tuple) throws 
SolrServerException, IOException {
             if (commitStgy == null) {
                 collector.ack(tuple);
             } else {
    -            toCommitTuples.add(tuple);
    -            commitStgy.update();
    -            if (commitStgy.commit()) {
    +            if (TupleUtils.isTick(tuple)) {
    +                LOG.debug("TICK! forcing solr client commit");
    +                collector.ack(tuple);
    --- End diff --
    
    I am also not sure why tick-tuples need to be acked as @arunmahadevan 
mentioned. Whenever an executor is started it schedules a timer which sends 
tick tuples to receive queue 
    
    ``` clojure
    (defn setup-ticks! [worker executor-data]
      (let [storm-conf (:storm-conf executor-data)
            tick-time-secs (storm-conf TOPOLOGY-TICK-TUPLE-FREQ-SECS)
            receive-queue (:receive-queue executor-data)
            context (:worker-context executor-data)]
        (when tick-time-secs
          (if (or (Utils/isSystemId (:component-id executor-data))
                  (and (= false (storm-conf TOPOLOGY-ENABLE-MESSAGE-TIMEOUTS))
                       (= :spout (:type executor-data))))
            (log-message "Timeouts disabled for executor " (:component-id 
executor-data) ":" (:executor-id executor-data))
            (schedule-recurring
              (:user-timer worker)
              tick-time-secs
              tick-time-secs
              (fn []
                (let [val [(AddressedTuple. AddressedTuple/BROADCAST_DEST 
(TupleImpl. context [tick-time-secs] Constants/SYSTEM_TASK_ID 
Constants/SYSTEM_TICK_STREAM_ID))]]
                  (disruptor/publish receive-queue val))))))))
    ```


> Solr bolt should handle tick tuples
> -----------------------------------
>
>                 Key: STORM-1419
>                 URL: https://issues.apache.org/jira/browse/STORM-1419
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-solr
>            Reporter: Xin Wang
>            Assignee: Xin Wang
>
> Solr bolt should handle tick tuples.
> Forcing solr client commit when bolt received tick tuple.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to