Skip to content

Commit

Permalink
Merge pull request #11 from aafemt/prefix
Browse files Browse the repository at this point in the history
Added VIO prefix as requested by Adriano
  • Loading branch information
asfernandes committed Mar 29, 2016
2 parents 6932807 + 8384525 commit 6ff433a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/jrd/tra.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3994,7 +3994,7 @@ void VerbAction::garbage_collect_idx_lite(thread_db* tdbb, jrd_tra* transaction,
*
* Functional description
* Clean up index entries and referenced BLOBs.
* This routine uses smaller set of staying record than original garbage_collect_idx().
* This routine uses smaller set of staying record than original VIO_garbage_collect_idx().
*
* Notes:
*
Expand Down Expand Up @@ -4208,11 +4208,11 @@ void VerbAction::undo(thread_db* tdbb, jrd_tra* transaction)
new_rpb.rpb_flags = 0;
Record* dead_record = rpb.rpb_record;
// This record will be in staying list twice. Ignorable overhead.
update_in_place(tdbb, transaction, &rpb, &new_rpb);
VIO_update_in_place(tdbb, transaction, &rpb, &new_rpb);
if (dead_record)
{
rpb.rpb_record = NULL; // garbage_collect_idx will play with this record dirty tricks
garbage_collect_idx(tdbb, transaction, &rpb, dead_record);
rpb.rpb_record = NULL; // VIO_garbage_collect_idx will play with this record dirty tricks
VIO_garbage_collect_idx(tdbb, transaction, &rpb, dead_record);
}
rpb.rpb_record = save_record;
}
Expand Down
10 changes: 5 additions & 5 deletions src/jrd/vio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,7 @@ void VIO_erase(thread_db* tdbb, record_param* rpb, jrd_tra* transaction)

if (rpb->rpb_transaction_nr == transaction->tra_number)
{
update_in_place(tdbb, transaction, rpb, &temp);
VIO_update_in_place(tdbb, transaction, rpb, &temp);
if (transaction->tra_save_point && transaction->tra_save_point->sav_verb_count)
{
verb_post(tdbb, transaction, rpb, rpb->rpb_undo);
Expand Down Expand Up @@ -2462,7 +2462,7 @@ void VIO_modify(thread_db* tdbb, record_param* org_rpb, record_param* new_rpb, j

if (transaction->tra_flags & TRA_system)
{
update_in_place(tdbb, transaction, org_rpb, new_rpb);
VIO_update_in_place(tdbb, transaction, org_rpb, new_rpb);
tdbb->bumpRelStats(RuntimeStatistics::RECORD_UPDATES, relation->rel_id);
return;
}
Expand Down Expand Up @@ -2815,7 +2815,7 @@ void VIO_modify(thread_db* tdbb, record_param* org_rpb, record_param* new_rpb, j
org_rpb->rpb_format_number == new_rpb->rpb_format_number)
{
IDX_modify_flag_uk_modified(tdbb, org_rpb, new_rpb, transaction);
update_in_place(tdbb, transaction, org_rpb, new_rpb);
VIO_update_in_place(tdbb, transaction, org_rpb, new_rpb);
if (!(transaction->tra_flags & TRA_system) &&
transaction->tra_save_point && transaction->tra_save_point->sav_verb_count)
{
Expand Down Expand Up @@ -4347,7 +4347,7 @@ static void garbage_collect(thread_db* tdbb, record_param* rpb, ULONG prior_page
clearRecordStack(going);
}

void garbage_collect_idx(thread_db* tdbb, jrd_tra* transaction,
void VIO_garbage_collect_idx(thread_db* tdbb, jrd_tra* transaction,
record_param* org_rpb,
Record* old_data)
{
Expand Down Expand Up @@ -5773,7 +5773,7 @@ static void set_system_flag(thread_db* tdbb, Record* record, USHORT field_id)
}


void update_in_place(thread_db* tdbb,
void VIO_update_in_place(thread_db* tdbb,
jrd_tra* transaction, record_param* org_rpb, record_param* new_rpb)
{
/**************************************
Expand Down
4 changes: 2 additions & 2 deletions src/jrd/vio_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ void VIO_store(Jrd::thread_db*, Jrd::record_param*, Jrd::jrd_tra*);
bool VIO_sweep(Jrd::thread_db*, Jrd::jrd_tra*, Jrd::TraceSweepEvent*);
void VIO_verb_cleanup(Jrd::thread_db*, Jrd::jrd_tra*);
void VIO_temp_cleanup(Jrd::jrd_tra*);
void garbage_collect_idx(Jrd::thread_db*, Jrd::jrd_tra*, Jrd::record_param*, Jrd::Record*);
void update_in_place(Jrd::thread_db*, Jrd::jrd_tra*, Jrd::record_param*, Jrd::record_param*);
void VIO_garbage_collect_idx(Jrd::thread_db*, Jrd::jrd_tra*, Jrd::record_param*, Jrd::Record*);
void VIO_update_in_place(Jrd::thread_db*, Jrd::jrd_tra*, Jrd::record_param*, Jrd::record_param*);

namespace Jrd
{
Expand Down

5 comments on commit 6ff433a

@hvlad
Copy link
Member

@hvlad hvlad commented on 6ff433a Mar 31, 2016

Choose a reason for hiding this comment

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

This is big mistake. Instead of make public private VIO routines, you should move class VerbAction into VIO

@dyemanov
Copy link
Member

Choose a reason for hiding this comment

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

Please, don't make any more changes right now. I'm refactoring this beast to move Savepoint class along with its friends and relatives to a separate module. I will double check whether VerbAction better belongs to vio.cpp or new Savepoint.cpp.

@aafemt
Copy link
Contributor

@aafemt aafemt commented on 6ff433a Mar 31, 2016 via email

Choose a reason for hiding this comment

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

@hvlad
Copy link
Member

@hvlad hvlad commented on 6ff433a Apr 1, 2016

Choose a reason for hiding this comment

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

I'm refactoring this beast to move Savepoint class along with its friends and relatives to a separate module
Good to know, thanks

@hvlad
Copy link
Member

@hvlad hvlad commented on 6ff433a Apr 1, 2016

Choose a reason for hiding this comment

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

aafemt,
you should learn about existing layers and don't break the things

Please sign in to comment.