[ 
https://issues.apache.org/jira/browse/CALCITE-3739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Feng Zhu updated CALCITE-3739:
------------------------------
    Description: 
In Windows OS, CassandraUnit leaves an extra "cassandra/.toDelete" snapshot 
track file.
 After migrating to Gradle, it is flagged as "unapproved license" and fails on 
"rat" task.
 It is annoying to manually delete this file every time.

!screen.png!

The issue is also mentioned in CALCITE-2442. But I found the snapshot file 
still exists with the fix.
{code:java}
  @AfterClass
  public static void tearDown() {
    if (RULE instanceof CassandraCQLUnit) {
      CassandraCQLUnit rule = (CassandraCQLUnit) RULE;
      rule.getSession().close();
      rule.getCluster().close();
      // see https://issues.apache.org/jira/browse/CALCITE-2442
      // see https://issues.apache.org/jira/browse/CASSANDRA-13085
      // Is it done by cluster.close() already ?
      if (FBUtilities.isWindows) {
        WindowsFailedSnapshotTracker.deleteOldSnapshots();
      }
    }
  }
{code}
I make some profling work. It seems that the snapshot track file is locked by 
other threads.
 "The process cannot access the file because it is being used by another 
process."
 Any ideas?

  was:
In Windows OS, CassandraUnit leaves an extra "cassandra/.toDelete" snapshot 
track file.
 After migrating to Gradle, it is flagged as "unapproved license" and fails on 
"rat" task.
 It is annoying to manually delete this file every time.

!fig.png!

The issue is also mentioned in CALCITE-2442. But I found the snapshot file 
still exists with the fix.
{code:java}
  @AfterClass
  public static void tearDown() {
    if (RULE instanceof CassandraCQLUnit) {
      CassandraCQLUnit rule = (CassandraCQLUnit) RULE;
      rule.getSession().close();
      rule.getCluster().close();
      // see https://issues.apache.org/jira/browse/CALCITE-2442
      // see https://issues.apache.org/jira/browse/CASSANDRA-13085
      // Is it done by cluster.close() already ?
      if (FBUtilities.isWindows) {
        WindowsFailedSnapshotTracker.deleteOldSnapshots();
      }
    }
  }
{code}
I make some profling work. It seems that the snapshot track file is locked by 
other threads.
 "The process cannot access the file because it is being used by another 
process."
 Any ideas?


> Remove failed snapshot track file in Windows OS for Cassandra adapter
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-3739
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3739
>             Project: Calcite
>          Issue Type: Bug
>          Components: cassandra-adapter
>            Reporter: Feng Zhu
>            Priority: Major
>         Attachments: screen.png
>
>
> In Windows OS, CassandraUnit leaves an extra "cassandra/.toDelete" snapshot 
> track file.
>  After migrating to Gradle, it is flagged as "unapproved license" and fails 
> on "rat" task.
>  It is annoying to manually delete this file every time.
> !screen.png!
> The issue is also mentioned in CALCITE-2442. But I found the snapshot file 
> still exists with the fix.
> {code:java}
>   @AfterClass
>   public static void tearDown() {
>     if (RULE instanceof CassandraCQLUnit) {
>       CassandraCQLUnit rule = (CassandraCQLUnit) RULE;
>       rule.getSession().close();
>       rule.getCluster().close();
>       // see https://issues.apache.org/jira/browse/CALCITE-2442
>       // see https://issues.apache.org/jira/browse/CASSANDRA-13085
>       // Is it done by cluster.close() already ?
>       if (FBUtilities.isWindows) {
>         WindowsFailedSnapshotTracker.deleteOldSnapshots();
>       }
>     }
>   }
> {code}
> I make some profling work. It seems that the snapshot track file is locked by 
> other threads.
>  "The process cannot access the file because it is being used by another 
> process."
>  Any ideas?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to