minor fix to speed up recent comments by user retrieval (nextRow label is used)

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@130988 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-08-05 13:44:29 +00:00
parent 62bad0c922
commit 59faa6b0d5
1 changed files with 3 additions and 2 deletions

View File

@ -1505,7 +1505,7 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
synchronized (commentsByUser) {
nextRow: for (Row<String, String> row : rows) {
for(Column<String> column: row.getColumns())
if(column.getName().equals("Userid"))
if(column.getName().equals("Userid")){
if(column.getStringValue().equals(userid)){
try{
Comment c = readCommentById(row.getKey());
@ -1516,8 +1516,9 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
}catch(Exception e){
_log.error("Unable to read comment with id" + row.getKey(), e);
}
continue nextRow;
}
continue nextRow;
}
}
}
}