You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/03/11 22:51:53 UTC
[GitHub] [geode] nabarunnag opened a new pull request #6123: GEODE-9019: Fixed missing synchronization blocks
nabarunnag opened a new pull request #6123:
URL: https://github.com/apache/geode/pull/6123
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
- [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
- [ ] Is your initial contribution a single, squashed commit?
- [ ] Does `gradlew build` run cleanly?
- [ ] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
### Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] nabarunnag commented on a change in pull request #6123: GEODE-9019: Fixed synchronization blocks missed in previous commit
Posted by GitBox <gi...@apache.org>.
nabarunnag commented on a change in pull request #6123:
URL: https://github.com/apache/geode/pull/6123#discussion_r592845086
##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
##########
@@ -615,7 +615,7 @@ public int setbit(
*/
@Override
- public void toData(DataOutput out, SerializationContext context) throws IOException {
+ public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
Review comment:
> * There are a couple of confirmSerializationIsStable tests and testSerializables. Is there any specific feature that you - like me to check in a test?
- added tests
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] nabarunnag commented on a change in pull request #6123: GEODE-9019: Fixed missing synchronization blocks
Posted by GitBox <gi...@apache.org>.
nabarunnag commented on a change in pull request #6123:
URL: https://github.com/apache/geode/pull/6123#discussion_r592837435
##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
##########
@@ -615,7 +615,7 @@ public int setbit(
*/
@Override
- public void toData(DataOutput out, SerializationContext context) throws IOException {
+ public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
Review comment:
- There are a couple of confirmSerializationIsStable tests and testSerializables. Is there any specific feature that you - like me to check in a test?
- Also, in this commit, I was just primarily undoing the removal of the synchronized blocks that I missed in the previous commit.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] upthewaterspout commented on a change in pull request #6123: GEODE-9019: Fixed missing synchronization blocks
Posted by GitBox <gi...@apache.org>.
upthewaterspout commented on a change in pull request #6123:
URL: https://github.com/apache/geode/pull/6123#discussion_r592815313
##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
##########
@@ -615,7 +615,7 @@ public int setbit(
*/
@Override
- public void toData(DataOutput out, SerializationContext context) throws IOException {
+ public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
Review comment:
Also, it would be nice to have a failing test for this if possible?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] upthewaterspout commented on a change in pull request #6123: GEODE-9019: Fixed synchronization blocks missed in previous commit
Posted by GitBox <gi...@apache.org>.
upthewaterspout commented on a change in pull request #6123:
URL: https://github.com/apache/geode/pull/6123#discussion_r596261087
##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
##########
@@ -615,7 +615,7 @@ public int setbit(
*/
@Override
- public void toData(DataOutput out, SerializationContext context) throws IOException {
+ public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
Review comment:
Ok. I will approve this PR with the understanding that there will be another fix to synchronize the rest of the memthods in RedisString.
When I was talking about tests, I meant tests that show that we actually need synchronization. Like a test that shows data corruption if we don't have synchronization. I'm not sure there is much value in programatically testing that the method has a synchronization modifier.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] nabarunnag merged pull request #6123: GEODE-9019: Fixed synchronization blocks missed in previous commit
Posted by GitBox <gi...@apache.org>.
nabarunnag merged pull request #6123:
URL: https://github.com/apache/geode/pull/6123
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] nabarunnag commented on a change in pull request #6123: GEODE-9019: Fixed missing synchronization blocks
Posted by GitBox <gi...@apache.org>.
nabarunnag commented on a change in pull request #6123:
URL: https://github.com/apache/geode/pull/6123#discussion_r592838083
##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
##########
@@ -615,7 +615,7 @@ public int setbit(
*/
@Override
- public void toData(DataOutput out, SerializationContext context) throws IOException {
+ public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
Review comment:
I will create another ticket to figure out which other methods are not synchronized and fix those. This commit is just to undo the synchronizied commits I missed
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] upthewaterspout commented on a change in pull request #6123: GEODE-9019: Fixed missing synchronization blocks
Posted by GitBox <gi...@apache.org>.
upthewaterspout commented on a change in pull request #6123:
URL: https://github.com/apache/geode/pull/6123#discussion_r592815012
##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/data/RedisString.java
##########
@@ -615,7 +615,7 @@ public int setbit(
*/
@Override
- public void toData(DataOutput out, SerializationContext context) throws IOException {
+ public synchronized void toData(DataOutput out, SerializationContext context) throws IOException {
Review comment:
I don't think it's just toData in for RedisString, I believe other methods need to be synchronized as well (like RedisHash and RedisSet do).
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [geode] nabarunnag commented on pull request #6123: GEODE-9019: Fixed missing synchronization blocks
Posted by GitBox <gi...@apache.org>.
nabarunnag commented on pull request #6123:
URL: https://github.com/apache/geode/pull/6123#issuecomment-797103463
In a previous commit I missed out the synchronized block for toData in RedisHash and RedisSet, but then noticed that RedisString will also now require the synchronized block.
----------------------------------------------------------------
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:
users@infra.apache.org