-
Notifications
You must be signed in to change notification settings - Fork 411
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
Page storage bug fix #87
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
JaySon-Huang
commented
Jun 21, 2019
- ensure PageFile with meta && data, in case gc drop file but be killed before drop dir
- turn PageStorage::Config::sync_on_write = true by default
- avoid PageStorage::gc concurrent called by multi-threads
- print PageFile's path if checksum is not correct
flowbehappy
reviewed
Jun 21, 2019
dbms/src/Storages/Page/PageFile.cpp
Outdated
return 0; | ||
} | ||
} | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is expected to throw an exception if must_exist == false && errno != ENOENT
.
flowbehappy
approved these changes
Jun 21, 2019
/run-integration-tests |
JaySon-Huang
added a commit
that referenced
this pull request
Jul 5, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
that referenced
this pull request
Jul 16, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Jul 16, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
that referenced
this pull request
Aug 2, 2019
…97) * Page storage bug fix (#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Aug 26, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Aug 26, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 5, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 5, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 12, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 12, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 18, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 18, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 23, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Sep 23, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
that referenced
this pull request
Sep 26, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
that referenced
this pull request
Sep 26, 2019
…97) * Page storage bug fix (#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 17, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 17, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 18, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 18, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
that referenced
this pull request
Oct 22, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
that referenced
this pull request
Oct 22, 2019
…97) * Page storage bug fix (#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 23, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 23, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 30, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Oct 30, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Nov 1, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Nov 1, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Nov 1, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Nov 1, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Nov 5, 2019
* add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT
JaySon-Huang
added a commit
to JaySon-Huang/tiflash
that referenced
this pull request
Nov 5, 2019
…ingcap#97) * Page storage bug fix (pingcap#87) * add test cases for PageStorage * split PageStorage gc stage into small helper functions * add test cases for PageStorage gc concurrency * add stress test and dump utils of PageStorage * Fix bug: 1. ensure PageFile with meta && data, in case gc drop file but be killed before drop dir 2. turn PageStorage::Config::sync_on_write = true by default 3. avoid PageStorage::gc run by multi-threads 4. print PageFile's path if checksum is not correct * throw exception for must_exist==false and errno != ENOENT * add RefPage && ref counting * 1. move PageCacheMap into isolated file 2. rename PageCacheMap -> PageEntryMap * accept non-exist Page reference/del while being used by WriteBatch or Gc * adjust gc on RefPages * add more test on gc RefPages * add memory usage comparing between vec/hashmap/treemap * fix tests code format * Bug fix: Add RefPage to non exist Page * Add unit test for PageStorage * fix bug * stress test for benchmark * fix bug of PageEntryMap updating RefPage * Keep RefPage entry ref-count if it has been gc and move to another place * MVCC on PageMap, All previse tests passed. TODO: refactor on read_mutex on PageStorage * PageStorage gc: only delete file that are not used by any version * fix bug under multi-threads; remove unused code && format codes * 1. support snapshot read 2. standalone VersionSet/MultiVersionCountable template * 1. Apply merge delta if no read ref 2. Apply generate new delta if has read ref 3. Delta merged when snapshot released 4. Add simple restore test 5. Use template and constexpr instead of copying codes in PageEntryMap * add test for PageStorage snapshot read * use typed test * Bug fix: Add RefPage to non exist Page * fix bug * Delta merged when view is finished * 1. VersionDeltaSet: add snapshots for snapshot linked-list, so that gc can collect valid PageFiles 2. fix some bugs * do compact on delta -> base * rebase after do compact on delta * fix bugs * avoid duplicted codes * 1. new find API 2. all tests passed * 1. remove legacy API 2. remove duplicated codes * reformat * apply inplace if there are no readers * fix bug of applying edits * fix bug of gc apply * fix bug of merging PageEntryMap * fix bug of invalid ref page * fix bug: 1. listAllLiveFiles 2. double compaction on same version * tmp * fixbug * split PageEntryMapView to single cpp file * minor fix * 1. Avoid visit same version multiple time in PageEntryMapDeltaVersionSet::listAllLiveFiles 2. use template to reduce duplicated code for gcApply * todo mark * fix bug: RefPage -> RefPage record may become invalid record when PageStorage GC * remove unused function * simple fix on unittest * fix bug: PageEntryMapView::isRefId * fix bug: PageEntryMapDeltaBuilder::applyPut * fix * fix bug: PageEntryView::validNormalPageIds filter out tombstone of PageEntry * iterator over PageEntryMap * remove unused tests * Refactor on PageEntryMapDeltaVersionSet * Reduce lock range when PageStorage Snapshot is release * Add metrics for PageStorage MVCC * rename some classes * reformat. * use exception instead * adress comment * adress comment * fix compiler error under gcc * fix compiler error under gcc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.