You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by dr...@apache.org on 2020/03/25 21:07:15 UTC

[gora] 02/02: GORA-649 MongoStore#flush is now no-op

This is an automated email from the ASF dual-hosted git repository.

drazzib pushed a commit to branch GORA-649-replace-deprecated-mongo-api
in repository https://gitbox.apache.org/repos/asf/gora.git

commit 1516198635fd7eb3856b5bce8346c121a4bb9cfe
Author: Damien Raude-Morvan <dr...@drazzib.com>
AuthorDate: Wed Mar 25 22:07:04 2020 +0100

    GORA-649 MongoStore#flush is now no-op
    
    Remove fsync handling since its deprecated upstream and should be replaced by proper WriteConcern
---
 .../main/java/org/apache/gora/mongodb/store/MongoStore.java    | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStore.java b/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStore.java
index 05ca503..295a675 100644
--- a/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStore.java
+++ b/gora-mongodb/src/main/java/org/apache/gora/mongodb/store/MongoStore.java
@@ -321,15 +321,7 @@ DataStoreBase<K, T> {
    */
   @Override
   public void flush() throws GoraException {
-    try {
-      for (MongoClient client : mapsOfClients.values()) {
-        client.fsync(false);
-        LOG.debug("Forced synced of database for Mongo instance {}.",
-            new Object[] { client });
-      }
-    } catch (Exception e) {
-      throw new GoraException(e);
-    }
+    // no-op
   }
 
   /**