Skip to content

Commit

Permalink
Cleanup of warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
badrishc committed Sep 13, 2019
1 parent 0740f87 commit 669881d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 33 deletions.
7 changes: 3 additions & 4 deletions cs/src/core/ClientSession/FASTERClientSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ internal void DisposeClientSession(Guid guid)
/// <summary>
/// Resume session with FASTER
/// </summary>
/// <param name="prevThreadCtx"></param>
/// <param name="threadCtx"></param>
internal void ResumeSession(FasterExecutionContext threadCtx)
/// <param name="ctx">Context</param>
internal void ResumeSession(FasterExecutionContext ctx)
{
epoch.Resume();
InternalRefresh(threadCtx);
InternalRefresh(ctx);
}

/// <summary>
Expand Down
41 changes: 21 additions & 20 deletions cs/src/core/Index/FASTER/FASTER.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public IEnumerable<long> GetPendingRequests()
/// <summary>
/// Complete the ongoing checkpoint (if any)
/// </summary>
/// <param name="wait"></param>
/// <param name="wait">Spin-wait for completion</param>
/// <returns></returns>
public bool CompleteCheckpoint(bool wait = false)
{
Expand Down Expand Up @@ -392,11 +392,6 @@ public bool CompleteCheckpoint(bool wait = false)
return false;
}

public Status Read(ref Key key, ref Input input, ref Output output, Context context, long serialNo)
{
return Read(ref key, ref input, ref output, context, serialNo, threadCtx.Value);
}

/// <summary>
/// Read operation
/// </summary>
Expand All @@ -406,6 +401,11 @@ public Status Read(ref Key key, ref Input input, ref Output output, Context cont
/// <param name="context">User context to identify operation in asynchronous callback</param>
/// <param name="serialNo">Increasing sequence number of operation (used for recovery)</param>
/// <returns>Status of operation</returns>
public Status Read(ref Key key, ref Input input, ref Output output, Context context, long serialNo)
{
return Read(ref key, ref input, ref output, context, serialNo, threadCtx.Value);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal Status Read(ref Key key, ref Input input, ref Output output, Context context, long serialNo, FasterExecutionContext sessionCtx)
{
Expand All @@ -424,11 +424,6 @@ internal Status Read(ref Key key, ref Input input, ref Output output, Context co
return status;
}

public Status Upsert(ref Key key, ref Value value, Context context, long serialNo)
{
return Upsert(ref key, ref value, context, serialNo, threadCtx.Value);
}

/// <summary>
/// (Blind) upsert operation
/// </summary>
Expand All @@ -437,6 +432,11 @@ public Status Upsert(ref Key key, ref Value value, Context context, long serialN
/// <param name="context">User context to identify operation in asynchronous callback</param>
/// <param name="serialNo">Increasing sequence number of operation (used for recovery)</param>
/// <returns>Status of operation</returns>
public Status Upsert(ref Key key, ref Value value, Context context, long serialNo)
{
return Upsert(ref key, ref value, context, serialNo, threadCtx.Value);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal Status Upsert(ref Key key, ref Value value, Context context, long serialNo, FasterExecutionContext sessionCtx)
{
Expand All @@ -456,10 +456,6 @@ internal Status Upsert(ref Key key, ref Value value, Context context, long seria
return status;
}

public Status RMW(ref Key key, ref Input input, Context context, long serialNo)
{
return RMW(ref key, ref input, context, serialNo, threadCtx.Value);
}

/// <summary>
/// Atomic read-modify-write operation
Expand All @@ -469,6 +465,11 @@ public Status RMW(ref Key key, ref Input input, Context context, long serialNo)
/// <param name="context">User context to identify operation in asynchronous callback</param>
/// <param name="serialNo">Increasing sequence number of operation (used for recovery)</param>
/// <returns>Status of operation</returns>
public Status RMW(ref Key key, ref Input input, Context context, long serialNo)
{
return RMW(ref key, ref input, context, serialNo, threadCtx.Value);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal Status RMW(ref Key key, ref Input input, Context context, long serialNo, FasterExecutionContext sessionCtx)
{
Expand All @@ -487,11 +488,6 @@ internal Status RMW(ref Key key, ref Input input, Context context, long serialNo
return status;
}

public Status Delete(ref Key key, Context context, long serialNo)
{
return Delete(ref key, context, serialNo, threadCtx.Value);
}

/// <summary>
/// Delete entry (use tombstone if necessary)
/// Hash entry is removed as a best effort (if key is in memory and at
Expand All @@ -502,6 +498,11 @@ public Status Delete(ref Key key, Context context, long serialNo)
/// <param name="context">User context to identify operation in asynchronous callback</param>
/// <param name="serialNo">Increasing sequence number of operation (used for recovery)</param>
/// <returns>Status of operation</returns>
public Status Delete(ref Key key, Context context, long serialNo)
{
return Delete(ref key, context, serialNo, threadCtx.Value);
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal Status Delete(ref Key key, Context context, long serialNo, FasterExecutionContext sessionCtx)
{
Expand Down
16 changes: 7 additions & 9 deletions cs/src/core/Index/FASTER/FASTERImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum LatchOperation : byte
/// <param name="output">Location to store output computed from input and value.</param>
/// <param name="userContext">User context for the operation, in case it goes pending.</param>
/// <param name="pendingContext">Pending context used internally to store the context of the operation.</param>
/// <param name="sessionCtx">Session context</param>
/// <returns>
/// <list type="table">
/// <listheader>
Expand Down Expand Up @@ -376,6 +377,7 @@ ref hlog.GetContextRecordValue(ref request),
/// <param name="value">value to be updated to (or inserted if key does not exist).</param>
/// <param name="userContext">User context for the operation, in case it goes pending.</param>
/// <param name="pendingContext">Pending context used internally to store the context of the operation.</param>
/// <param name="sessionCtx">Session context</param>
/// <returns>
/// <list type="table">
/// <listheader>
Expand Down Expand Up @@ -639,6 +641,7 @@ internal OperationStatus InternalUpsert(
/// <param name="input">input used to update the value.</param>
/// <param name="userContext">user context corresponding to operation used during completion callback.</param>
/// <param name="pendingContext">pending context created when the operation goes pending.</param>
/// <param name="sessionCtx">Session context</param>
/// <returns>
/// <list type="table">
/// <listheader>
Expand Down Expand Up @@ -964,6 +967,7 @@ ref hlog.GetValue(physicalAddress),
/// </summary>
/// <param name="opCtx">Thread (or session) context under which operation must be executed.</param>
/// <param name="pendingContext">Internal context of the RMW operation.</param>
/// <param name="sessionCtx">Session context</param>
/// <returns>
/// <list type="table">
/// <listheader>
Expand Down Expand Up @@ -1236,6 +1240,7 @@ ref hlog.GetValue(physicalAddress),
/// <param name="opCtx">thread (or session) context under which operation must be executed.</param>
/// <param name="request">record read from the disk.</param>
/// <param name="pendingContext">internal context for the pending RMW operation</param>
/// <param name="sessionCtx">Session context</param>
/// <returns>
/// <list type="table">
/// <listheader>
Expand Down Expand Up @@ -1373,6 +1378,7 @@ ref hlog.GetContextRecordValue(ref request),
/// <param name="key">Key of the record to be deleted.</param>
/// <param name="userContext">User context for the operation, in case it goes pending.</param>
/// <param name="pendingContext">Pending context used internally to store the context of the operation.</param>
/// <param name="sessionCtx">Session context</param>
/// <returns>
/// <list type="table">
/// <listheader>
Expand Down Expand Up @@ -1668,15 +1674,6 @@ internal OperationStatus InternalDelete(

#region ContainsKeyInMemory

/// <summary>
/// Experimental feature
/// Checks whether specified record is present in memory
/// (between HeadAddress and tail, or between fromAddress
/// and tail)
/// </summary>
/// <param name="key">Key of the record.</param>
/// <param name="fromAddress">Look until this address</param>
/// <returns>Status</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal Status InternalContainsKeyInMemory(ref Key key, FasterExecutionContext sessionCtx, long fromAddress = -1)
{
Expand Down Expand Up @@ -1745,6 +1742,7 @@ internal Status InternalContainsKeyInMemory(ref Key key, FasterExecutionContext
/// Performs appropriate handling based on the internal failure status of the trial.
/// </summary>
/// <param name="opCtx">Thread (or session) context under which operation was tried to execute.</param>
/// <param name="currentCtx">Current context</param>
/// <param name="pendingContext">Internal context of the operation.</param>
/// <param name="status">Internal status of the trial.</param>
/// <returns>
Expand Down

0 comments on commit 669881d

Please sign in to comment.