Applied these cosmetic changes.

Could anyone with commit rights apply the patch to 1.4 branch? It doesn't make sense to create an issue and pull-request for such minor changes.
The patch is attached.

--
Denis

On 9/19/2015 5:53 PM, Dmitriy Setrakyan wrote:
On Sat, Sep 19, 2015 at 12:11 PM, Denis Magda <[email protected]> wrote:

Igniters,

I've faced with some confusing places in cache related documentations.
Before fixing it I want to be sure that my understanding is correct.

- CacheAtomicityMode.TRANSACTIONAL. There is a sentence saying: /"However,
cache * atomicity mode will be changed to {@link #ATOMIC} starting from
version {@code 5.2}, * so it is recommended that desired atomicity mode is
explicitly configured * instead of relying on default value."
/In my understanding it's time to remove the sentence, correct?

Agree, let's remove it.


- CacheConfiguration.getAtomicityMode() returns null if the mode wasn't
explicitly set. But this is not highlighted in the documentation.
I propose to initialize internal variable with DFLT_CACHE_ATOMICITY_MODE
at the time the CacheConfiguration instance is being created .
Is anyone knows a reason why we should initialization logic as is?

I don't mind, but we must make sure whether the "null" value in
configuration gets a special treatment.


- CacheAtomicityMode.ATOMIC. There is a sentence: /"This mode is currently
implemented for {@link CacheMode#PARTITIONED} caches only."
/This seems to be an outdated info. I can easily create a replicated cache
with atomic mode.
Let's remove the sentence?

Yes, let's remove it (this is very misleading).



--
Denis


Index: 
../incubator-ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- 
../incubator-ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
  (revision 7ccd0b315192657f5fb2cde565ae4a12e4764b40)
+++ 
../incubator-ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
  (revision )
@@ -271,7 +271,7 @@
             cfg.setRebalanceMode(ASYNC);
 
         if (cfg.getAtomicityMode() == null)
-            cfg.setAtomicityMode(ATOMIC);
+            cfg.setAtomicityMode(CacheConfiguration.DFLT_CACHE_ATOMICITY_MODE);
 
         if (cfg.getWriteSynchronizationMode() == null)
             cfg.setWriteSynchronizationMode(PRIMARY_SYNC);
Index: 
../incubator-ignite/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- 
../incubator-ignite/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
      (revision 7ccd0b315192657f5fb2cde565ae4a12e4764b40)
+++ 
../incubator-ignite/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java
      (revision )
@@ -33,11 +33,6 @@
     /**
      * Specified fully {@code ACID}-compliant transactional cache behavior. See
      * {@link Transaction} for more information about transactions.
-     * <p>
-     * This mode is currently the default cache atomicity mode. However, cache
-     * atomicity mode will be changed to {@link #ATOMIC} starting from version 
{@code 5.2},
-     * so it is recommended that desired atomicity mode is explicitly 
configured
-     * instead of relying on default value.
      */
     TRANSACTIONAL,
 
@@ -49,18 +44,16 @@
      * In addition to transactions and locking, one of the main differences in 
{@code ATOMIC} mode
      * is that bulk writes, such as {@code putAll(...)}, {@code 
removeAll(...)}, and {@code transformAll(...)}
      * methods, become simple batch operations which can partially fail. In 
case of partial
-     * failure {@link 
org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException} 
will be thrown which will contain a list of keys
-     * for which the update failed. It is recommended that bulk writes are 
used whenever multiple keys
-     * need to be inserted or updated in cache, as they reduce number of 
network trips and provide
-     * better performance.
+     * failure {@link 
org.apache.ignite.internal.processors.cache.CachePartialUpdateCheckedException} 
will be thrown
+     * which will contain a list of keys for which the update failed. It is 
recommended that bulk writes are used
+     * whenever multiple keys need to be inserted or updated in cache, as they 
reduce number of network trips and
+     * provide better performance.
      * <p>
      * Note that even without locking and transactions, {@code ATOMIC} mode 
still provides
      * full consistency guarantees across all cache nodes.
      * <p>
      * Also note that all data modifications in {@code ATOMIC} mode are 
guaranteed to be atomic
      * and consistent with writes to the underlying persistent store, if one 
is configured.
-     * <p>
-     * This mode is currently implemented for {@link CacheMode#PARTITIONED} 
caches only.
      */
     ATOMIC;
 
@@ -76,4 +69,4 @@
     @Nullable public static CacheAtomicityMode fromOrdinal(int ord) {
         return ord >= 0 && ord < VALS.length ? VALS[ord] : null;
     }
-}
\ No newline at end of file
+}

Reply via email to