You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "jacek-lewandowski (via GitHub)" <gi...@apache.org> on 2023/06/29 09:42:21 UTC

[GitHub] [cassandra] jacek-lewandowski commented on a diff in pull request #2456: 17909 trunk; update SyncUtil for JDK11 and JDK17

jacek-lewandowski commented on code in PR #2456:
URL: https://github.com/apache/cassandra/pull/2456#discussion_r1246393407


##########
src/java/org/apache/cassandra/utils/SyncUtil.java:
##########
@@ -149,18 +106,8 @@ public static void sync(FileDescriptor fd) throws SyncFailedException
                 throw new RuntimeException(e);
             }
 
-            int useCount = 1;
-            try
-            {
-                if (fdUseCountField != null)
-                    useCount = ((AtomicInteger)fdUseCountField.get(fd)).get();
-            }
-            catch (Exception e)
-            {
-                throw new RuntimeException(e);
-            }
-            if (closed || !fd.valid() || useCount < 0)
-                throw new SyncFailedException("Closed " + closed + " valid " + fd.valid() + " useCount " + useCount);
+            if (closed || !fd.valid())

Review Comment:
   This "sync" method is unused and can be removed entirely. Then, we can drop all the reflections from this class.



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org