[ 
https://issues.apache.org/jira/browse/GEODE-8171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17118099#comment-17118099
 ] 

ASF GitHub Bot commented on GEODE-8171:
---------------------------------------

karensmolermiller commented on a change in pull request #5147:
URL: https://github.com/apache/geode/pull/5147#discussion_r431440863



##########
File path: geode-core/src/main/java/org/apache/geode/cache/Region.java
##########
@@ -1362,49 +1362,77 @@ Object selectValue(String queryPredicate) throws 
FunctionDomainException, TypeMi
    * <code>Scope.LOCAL</code>.
    *
    * If an exception is thrown due to this call, it can imply that there may 
have been a partial
-   * update performed on the region. Use putAll from within a transaction to 
to obtain an atomic
-   * update.
+   * update performed on the region.
    * <p>
    *
    * @see java.util.Map#putAll(Map map)
-   * @param map the key/value pairs to put in this region.
+   * @param map the key/value pairs to put in this region
+   * @throws ServerOperationException if called from a client, and the server 
throws an exception
+   *         such as CacheWriterException, PartitionedRegionStorageException 
or LowMemoryException.
+   *         These server exceptions become the ServerOperationException cause
+   * @throws ServerConnectivityException if called from a client, and the 
server throws
+   *         CancelException. CancelException will be the 
ServerConnectivityException cause
    * @throws NullPointerException if key is null or if value is null (use 
invalidate instead), or if
    *         the key or value do not meet serializability requirements

Review comment:
       Please slightly reword NullPointerException (in BOTH putAll signatures):
   if the key is null, if the value is null (use invalidate instead), or if the 
key or value do not meet serialization requirements

##########
File path: geode-core/src/main/java/org/apache/geode/cache/Region.java
##########
@@ -1362,49 +1362,77 @@ Object selectValue(String queryPredicate) throws 
FunctionDomainException, TypeMi
    * <code>Scope.LOCAL</code>.
    *
    * If an exception is thrown due to this call, it can imply that there may 
have been a partial
-   * update performed on the region. Use putAll from within a transaction to 
to obtain an atomic
-   * update.
+   * update performed on the region.
    * <p>
    *
    * @see java.util.Map#putAll(Map map)
-   * @param map the key/value pairs to put in this region.
+   * @param map the key/value pairs to put in this region
+   * @throws ServerOperationException if called from a client, and the server 
throws an exception
+   *         such as CacheWriterException, PartitionedRegionStorageException 
or LowMemoryException.
+   *         These server exceptions become the ServerOperationException cause
+   * @throws ServerConnectivityException if called from a client, and the 
server throws
+   *         CancelException. CancelException will be the 
ServerConnectivityException cause
    * @throws NullPointerException if key is null or if value is null (use 
invalidate instead), or if
    *         the key or value do not meet serializability requirements
    * @throws ClassCastException if key does not satisfy the keyConstraint
-   * @throws org.apache.geode.distributed.LeaseExpiredException if lease 
expired on distributed lock
-   *         for Scope.GLOBAL
-   * @throws TimeoutException if timed out getting distributed lock for 
Scope.GLOBAL
+   * @throws org.apache.geode.distributed.LeaseExpiredException if lease 
expired on distributed
+   *         lock for regions with Scope.GLOBAL

Review comment:
       Please slightly reword LeaseExpiredException (in BOTH putall signatures):
   if the lease expired on a distributed lock, for regions with Scope.GLOBAL




----------------------------------------------------------------
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.

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


> javadoc for putAll need to have accurate exception 
> ---------------------------------------------------
>
>                 Key: GEODE-8171
>                 URL: https://issues.apache.org/jira/browse/GEODE-8171
>             Project: Geode
>          Issue Type: Improvement
>            Reporter: Xiaojian Zhou
>            Assignee: Xiaojian Zhou
>            Priority: Major
>              Labels: GeodeOperationAPI
>
> Both the javadocs and the user guide need a more accurate description of the 
> exceptions that can be thrown when an app calls putAll().  
> Correct the javadocs to list all exceptions that may be thrown.
> Add a code fragment example to the user guide (and to the javadocs, if 
> appropriate) that shows a best practice for an app to call putAll() and 
> handle exceptions.
> Describe what might cause the exceptions and let users know how to adjust 
> cluster configuration mitigate the exceptions.



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

Reply via email to