Skip to content

Commit

Permalink
Fix for issue #185 on master.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdogan committed Jun 11, 2012
1 parent 32dd392 commit d90b967
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 185 deletions.
6 changes: 5 additions & 1 deletion hazelcast/src/main/java/com/hazelcast/impl/CMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,11 @@ record = createAndAddNewRecord(req.key, req.value);
if (localUpdateListener != null && req.txnId != Long.MIN_VALUE) {
localUpdateListener.recordUpdated(record);
}
if (req.operation == CONCURRENT_MAP_REPLACE_IF_SAME || req.operation == CONCURRENT_MAP_SET) {
if (req.operation == CONCURRENT_MAP_SET
|| req.operation == CONCURRENT_MAP_TRY_PUT
|| req.operation == CONCURRENT_MAP_PUT_TRANSIENT
|| req.operation == CONCURRENT_MAP_REPLACE_IF_SAME
|| req.operation == CONCURRENT_MAP_PUT_AND_UNLOCK) {
req.response = Boolean.TRUE;
} else {
req.response = oldValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2736,7 +2736,8 @@ class PutOperationHandler extends SchedulableOperationHandler {
protected void onNoTimeToSchedule(Request request) {
request.response = null;
if (request.operation == CONCURRENT_MAP_TRY_PUT
|| request.operation == CONCURRENT_MAP_PUT_AND_UNLOCK) {
|| request.operation == CONCURRENT_MAP_PUT_AND_UNLOCK
|| request.operation == CONCURRENT_MAP_SET) {
request.response = Boolean.FALSE;
}
returnResponse(request);
Expand All @@ -2750,10 +2751,6 @@ void doOperation(Request request) {
css.logObject(request, CS_TRACE, "Calling cmap.put");
}
cmap.put(request);
if (request.operation == CONCURRENT_MAP_TRY_PUT
|| request.operation == CONCURRENT_MAP_PUT_AND_UNLOCK) {
request.response = Boolean.TRUE;
}
if (css.shouldLog(CS_INFO)) {
css.info(request, "req.response", request.response);
}
Expand Down Expand Up @@ -2795,7 +2792,7 @@ public void handle(Request request) {
css.trace(request, "Record is", record);
}
if ((record == null || record.isLoadable()) && cmap.loader != null
&& request.operation != ClusterOperation.CONCURRENT_MAP_PUT_TRANSIENT) {
&& request.operation != ClusterOperation.CONCURRENT_MAP_SET) {
if (css.shouldLog(CS_TRACE)) {
css.trace(request, "Will Load");
}
Expand Down
Loading

0 comments on commit d90b967

Please sign in to comment.