Skip to content

Conversation

@kaushalkapasi
Copy link
Contributor

@kaushalkapasi kaushalkapasi commented Feb 28, 2023

  • update local bucketing to use address pinning
  • update to wasmtime 0.14 and jackson 2.14.2

WasmFunctions.Consumer3<Integer, Integer, Integer> fn = WasmFunctions.consumer(store, queueEventPtr, I32, I32, I32);
fn.accept(tokenAddress, userAddress, eventAddress);
fn.accept(sdkKeyAddress, userAddress, eventAddress);
unpinParameter(userAddress);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens in case of errors thrown above?

Copy link
Contributor Author

@kaushalkapasi kaushalkapasi Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all errors are surfaced in the DVCLocalClient, with try / catch blocks around each call to Local Bucketing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah but the values wont be unpinned until the next time one of the two methods that triggers unpin is called.

the approach I went with for c# was just to unpin at the beginning of every method so that you'd only have at most one method call's worth of pinned resources left behind by some error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, will do the same here :) thanks

@kaushalkapasi kaushalkapasi force-pushed the DVC-6373-fix-wasm-allocation branch from b1c8093 to d826b5c Compare February 28, 2023 20:31
@kaushalkapasi kaushalkapasi force-pushed the DVC-6373-fix-wasm-allocation branch 2 times, most recently from f778b1f to cf1118f Compare February 28, 2023 20:51
@kaushalkapasi kaushalkapasi force-pushed the DVC-6373-fix-wasm-allocation branch from cf1118f to 657179e Compare February 28, 2023 20:53
@kaushalkapasi kaushalkapasi force-pushed the DVC-6373-fix-wasm-allocation branch from 657179e to a188be1 Compare February 28, 2023 20:53
@kaushalkapasi kaushalkapasi merged commit 1a7de31 into main Feb 28, 2023
@kaushalkapasi kaushalkapasi deleted the DVC-6373-fix-wasm-allocation branch February 28, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants