public int doActionPostComments(DB db,int threadid, StringBuilder updateLog, StringBuilder readLog,int seqID, HashMap<String, Integer> resUpdateOperations, int thinkTime, boolean insertImage, boolean warmup)
	{
		//posts a comment on one of her owned resources
		int numOpsDone = 0;
		int commentor = buildKeyName(usercount);
		commentor = activateUser(commentor);
		if(commentor == -1)
			return 0;
		incrUserRef(commentor);
		Vector<Integer> profilekeynameresources = createdResources[memberIdxs.get(commentor)];
		if(profilekeynameresources.size() > 0){
			Random random = new Random();
			int idx = random.nextInt(profilekeynameresources.size());
			Vector<HashMap<String,ByteIterator>> cResult=new Vector<HashMap<String,ByteIterator>>();
			String resourceID = "";
			resourceID = profilekeynameresources.get(idx).toString();
			if(!warmup){
				HashMap<String,ByteIterator> commentValues = new HashMap<String, ByteIterator>(); 
				createCommentAttrs(commentValues);
				try {
					//needed for when we have a mix of actions and sessions as other members can also post comments on any resource
					sCmts.acquire();
				} catch (InterruptedException e) {
					e.printStackTrace();
				} 
				int mid = maxCommentIds.get(Integer.parseInt(resourceID))+1;
				maxCommentIds.put(Integer.parseInt(resourceID), mid);	
				sCmts.release();
				commentValues.put("mid", new ObjectByteIterator(Integer.toString(mid).getBytes()));
				long startUpdate = System.nanoTime();
				int ret =db.postCommentOnResource(commentor, commentor, Integer.parseInt(resourceID), commentValues); 
				if(ret < 0){
					System.out.println("There is an exception in postComment."+mid+" "+resourceID+" "+commentor+" "+postedComments.get(Integer.parseInt(resourceID)));
					System.exit(0);
				}
				long endUpdate = System.nanoTime();
				postedComments.get(Integer.parseInt(resourceID)).add(mid);
				numOpsDone++;
				int numUpdatesTillNow = 0;

				if(resUpdateOperations.get(resourceID)!= null){
					numUpdatesTillNow = resUpdateOperations.get(resourceID);
				}
				resUpdateOperations.put(resourceID, (numUpdatesTillNow+1));
				if(enableLogging){
					updateLog.append("UPDATE,POSTCOMMENT,"+seqID+","+threadid+","+resourceID+","+startUpdate+","+endUpdate+","+(numUpdatesTillNow+1)+",I"+"\n");
					updatesExist = true;
				}
			}
		}		
		deactivateUser(commentor);
		return numOpsDone;

	}