Skip to content

Commit

Permalink
Fixes #31
Browse files Browse the repository at this point in the history
* Removed MarkClean
* Removed calls to MarkClean

The client should have no knowledge of the internals of a RiakObject and what constitutes clean or dirty. This is ORM functionality. We will revisit this once we've made CorrugatedIron a more robust client.
  • Loading branch information
peschkaj committed Nov 18, 2011
1 parent ba920d8 commit f8e1187
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions CorrugatedIron/Models/RiakObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,6 @@ public RiakObjectId ToRiakObjectId()
return new RiakObjectId(Bucket, Key);
}

public void MarkClean()
{
_hashCode = CalculateHashCode();
}

internal RiakObject(string bucket, string key, RpbContent content, byte[] vectorClock)
{
Bucket = bucket;
Expand Down
12 changes: 0 additions & 12 deletions CorrugatedIron/RiakClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ public RiakResult<RiakObject> Put(RiakObject value, RiakPutOptions options = nul
new RiakObject(value.Bucket, value.Key, c, result.Value.VectorClock)).ToList();
}

value.MarkClean();

return RiakResult<RiakObject>.Success(finalResult);
}

Expand Down Expand Up @@ -271,16 +269,6 @@ public IEnumerable<RiakResult<RiakObject>> Put(IEnumerable<RiakObject> values, R
return RiakResult<IEnumerable<RiakResult<RpbPutResp>>>.Success(responses);
});

var resultsArray = results.Value.ToArray();

for(var i = 0; i < resultsArray.Length; i++)
{
if(resultsArray[i].IsSuccess)
{
values.ElementAt(i).MarkClean();
}
}

return results.Value.Zip(values, Tuple.Create).Select(t =>
{
if(t.Item1.IsSuccess)
Expand Down

0 comments on commit f8e1187

Please sign in to comment.