azotcsit commented on a change in pull request #1232:
URL: https://github.com/apache/cassandra/pull/1232#discussion_r724752928



##########
File path: build.xml
##########
@@ -93,7 +93,7 @@
     <property name="maven-repository-url" 
value="https://repository.apache.org/content/repositories/snapshots"/>
     <property name="maven-repository-id" value="apache.snapshots.https"/>
 
-    <property name="test.timeout" value="240000" />
+    <property name="test.timeout" value="360000" />

Review comment:
       I'm not sure changing timeout is what we really want because it affects 
a bunch of other test cases. If we clearly understand that the 
`HintsServiceTest` is long then probably it makes sense to move it from 
"src/unit" to "src/long", so higher timeout is applied automatically. WDYT?

##########
File path: src/java/org/apache/cassandra/hints/HintsDispatchExecutor.java
##########
@@ -275,23 +275,40 @@ private boolean deliver(HintsDescriptor descriptor, 
InetAddressAndPort address)
                 if (offset != null)
                     dispatcher.seek(offset);
 
-                if (dispatcher.dispatch())
+                try
                 {
-                    store.delete(descriptor);
-                    store.cleanUp(descriptor);
-                    logger.info("Finished hinted handoff of file {} to 
endpoint {}: {}", descriptor.fileName(), address, hostId);
-                    return true;
+                    boolean dispatchResult = dispatcher.dispatch();
+                    if (dispatchResult)
+                    {
+                        store.delete(descriptor);
+                        store.cleanUp(descriptor);
+                        logger.info("Finished hinted handoff of file {} to 
endpoint {}: {}", descriptor.fileName(), address, hostId);
+                        return true;
+                    }
+                    else
+                    {
+                        handleDispatchFailure(dispatcher, descriptor, address);
+                        return false;
+                    }
                 }
-                else
+                // we wrap InterruptedException in AssertionError
+                // without that catch, undispatched HintsDescriptor won't be 
added back to the store and cleaned up by
+                // HintsStore.delete
+                catch (AssertionError e)

Review comment:
       It is `UncheckedInterruptedException` in trunk now. JFYI.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to