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

[CBRD-20307] Use ordered pgbuf fix when setting prev version lsa and keep forward page if a newhome is inserted #111

Merged
merged 14 commits into from Jun 22, 2016

Conversation

andrei14vl
Copy link
Collaborator

Fixing pages directly generates deadlocks, especially in case of relocation updates.

The forward page of the newhome record, that may be inserted at update, will remain fixed to be used at heap_update_set_prev_version (). In this way the forward page is fixed/unfixed only once.

@@ -23718,7 +23735,8 @@ heap_update_bigone (THREAD_ENTRY * thread_p, HEAP_OPERATION_CONTEXT * context, b
/* insert new home */
HEAP_PERF_TRACK_EXECUTE (thread_p, context);
context->recdes_p->type = REC_NEWHOME;
if (heap_insert_newhome (thread_p, context, context->recdes_p, &newhome_oid) != NO_ERROR)
if (heap_insert_newhome (thread_p, context, context->recdes_p, &newhome_oid, newhome_pg_watcher_p) !=
NO_ERROR)
Copy link
Contributor

Choose a reason for hiding this comment

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

@andrei14vl

please consider cases that newhome_pg_watcher_p points a page buffer and an error occurs before reaching pgbuf_ordered_unfix.

Please also observe heap_update_relocation and heap_update_home function has the same structure.

@@ -26426,7 +26429,8 @@ heap_update_set_prev_version (THREAD_ENTRY * thread_p, const OID * oid, PGBUF_WA
goto end;
Copy link
Contributor

Choose a reason for hiding this comment

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

@andrei14vl

Here also needs

pgbuf_ordered_unfix (thread_p, &overflow_pg_watcher);

:)

@eseokoh
Copy link
Contributor

eseokoh commented Jun 21, 2016

@andrei14vl

To mark dirty the page for error cases will not matter. It looks better to remove redundancies and protect potential issues.

Would you ask Remzi if he has a comment before merging it?
Thank you. 😃

}
/* old home will be updated with the forward record */
}
else
{
if (heap_ovf_update (thread_p, &context->hfid, &overflow_oid, context->recdes_p) == NULL)
{
return ER_FAILED;
error_code = ER_FAILED;
Copy link
Contributor

Choose a reason for hiding this comment

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

ASSERT_ERROR_AND_SET (error_code);

@ribram
Copy link
Contributor

ribram commented Jun 21, 2016

@andrei14vl
Please add the ASSERT_ERROR/ASSERT_ERROR_AND_SET sanity checks and merge the PR :).

@andrei14vl
Copy link
Collaborator Author

It is very unexpected to have an error in or_mvcc_set_log_lsa_to_record (). Therfore, it shouldn't be important if the pages are marked as dirty in such situation.

@eseokoh
Copy link
Contributor

eseokoh commented Jun 21, 2016

Yes, indeed.

@eseokoh
Copy link
Contributor

eseokoh commented Jun 22, 2016

@andrei14vl

Would you merge the fix? :)

@andrei14vl
Copy link
Collaborator Author

Some regressions occurred. I will merge after fix.

@eseokoh
Copy link
Contributor

eseokoh commented Jun 22, 2016

@andrei14vl

I see. I'll keep following you. :)

@eseokoh
Copy link
Contributor

eseokoh commented Jun 22, 2016

@andrei14vl

Please let us know when it passes a regression test. :)

@andrei14vl
Copy link
Collaborator Author

The regression test is completed. Do you have any other concerns?

@eseokoh
Copy link
Contributor

eseokoh commented Jun 22, 2016

@andrei14vl

I don't have a concern. It looks mature for me to be merged.

@ribram

Do you have anything else?

@andrei14vl andrei14vl merged commit 002af69 into CUBRID:develop Jun 22, 2016
@eseokoh
Copy link
Contributor

eseokoh commented Jun 22, 2016

@andrei14vl
Great.
Thanks again. 😄

@andrei14vl andrei14vl deleted the CBRD_20307 branch August 31, 2016 08:29
@eseokoh eseokoh modified the milestone: banana pie May 12, 2017
ribram pushed a commit to ribram/cubrid that referenced this pull request May 21, 2021
* [SC-208] Add etcd cli and cpprest to cmake (CUBRID#91)

https://arniadb.atlassian.net/browse/SC-208

Add argument to build cpprest and etcd cli in cmake. They get installed to specified install prefix.

* [SC-209] Add etcd client to cluster class (CUBRID#99)

https://arniadb.atlassian.net/browse/SC-209

Connect to etcd on heartbeat start and add topology_server_connection class for topology operations.

* [SC-210] Initialize cluster from etcd server topology (CUBRID#100)

https://arniadb.atlassian.net/browse/SC-210

Initialize local cluster nodes with topology from etcd. Append myself to etcd topology.

* [SC-211] Check periodically if new node joined the cluster (CUBRID#103)

https://arniadb.atlassian.net/browse/SC-211

Added recurring HB_CJOB_CHECK_TOPOLOGY_UPDATES heartbeat job which fetches cluster nodes list from topology server and updates local cluster. Also included a parameter to tune the interval for checking the topology server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants