Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed LookupMetadata hit/miss counts #100

Merged
merged 22 commits into from
Aug 8, 2019

Conversation

jeffrey-a-meunier
Copy link
Contributor

Added the ability to use an existing LookupMetadata instance to initialize a new (or many new) LookupMetadata instances.

initialize a new (or *many* new) LookupMetadata instances.
@jeffrey-a-meunier jeffrey-a-meunier self-assigned this Jul 31, 2019
@codecov-io
Copy link

codecov-io commented Jul 31, 2019

Codecov Report

Merging #100 into master will increase coverage by 1.7%.
The diff coverage is 92.89%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #100     +/-   ##
===========================================
+ Coverage     87.91%   89.61%   +1.7%     
- Complexity      684      719     +35     
===========================================
  Files            52       56      +4     
  Lines          2259     2678    +419     
  Branches        171      176      +5     
===========================================
+ Hits           1986     2400    +414     
- Misses          185      193      +8     
+ Partials         88       85      -3
Impacted Files Coverage Δ Complexity Δ
.../com/upserve/uppend/lookup/LookupDataIterator.java 100% <ø> (ø) 6 <0> (ø) ⬇️
.../java/com/upserve/uppend/cli/CommandBenchmark.java 96% <ø> (ø) 6 <0> (ø) ⬇️
...pserve/uppend/metrics/CounterStoreWithMetrics.java 94.73% <0%> (-5.27%) 15 <0> (ø)
...va/com/upserve/uppend/cli/benchmark/Benchmark.java 83.73% <100%> (+1.28%) 16 <0> (ø) ⬇️
...rve/uppend/metrics/AppendOnlyStoreWithMetrics.java 100% <100%> (ø) 27 <5> (+3) ⬆️
...ava/com/upserve/uppend/AppendOnlyStoreBuilder.java 100% <100%> (ø) 12 <2> (+2) ⬆️
...com/upserve/uppend/blobs/VirtualLongBlobStore.java 100% <100%> (ø) 12 <5> (+1) ⬆️
...main/java/com/upserve/uppend/FileStoreBuilder.java 100% <100%> (ø) 31 <3> (+3) ⬆️
src/main/java/com/upserve/uppend/FileStore.java 82.85% <100%> (+4.16%) 37 <6> (+7) ⬆️
...serve/uppend/blobs/VirtualAppendOnlyBlobStore.java 90.32% <100%> (+6.11%) 8 <3> (+1) ⬆️
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a03663e...9e15002. Read the comment docs.

@jeffrey-a-meunier
Copy link
Contributor Author

I'll start working on the test cases now.

Copy link
Contributor

@dstuebe dstuebe left a comment

Choose a reason for hiding this comment

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

Great start - testing tomorrow!

src/main/java/com/upserve/uppend/lookup/LookupData.java Outdated Show resolved Hide resolved
if (luckyMe) {
result = loadMetadata();
// a reloadInterval of 0 prevents reloading of the metadata
boolean reloadMetadata = !reloadStamp.compareAndSet(stamp[0], stamp[0] + reloadInterval);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's test this a bunch.
We need to figure out how to hit both the elapsed time condition and the first thread to compare and set...

src/main/java/com/upserve/uppend/lookup/LookupData.java Outdated Show resolved Hide resolved
write(pos, byteRecord(bytes));
if (log.isTraceEnabled()) log.trace("appended {} bytes to {} at pos {}", bytes.length, virtualFileNumber, pos);
blobStoreMetricsAdders.appendCounter.increment();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

How much might using these counters affect performance?

Copy link
Contributor

Choose a reason for hiding this comment

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

Curious to see what total time is for LongAdder.increment in JProfiler...

Copy link
Contributor Author

@jeffrey-a-meunier jeffrey-a-meunier left a comment

Choose a reason for hiding this comment

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

One comment in the code, but I see no problems here fwiw.

Copy link
Contributor

@dstuebe dstuebe left a comment

Choose a reason for hiding this comment

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

I think we are there!

@dstuebe dstuebe merged commit f29374a into master Aug 8, 2019
@dstuebe dstuebe deleted the fixed_lookupmetadata_hit_miss_counts branch August 8, 2019 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants