Initial add of defaria.com
[clearscm.git] / defaria.com / blogs / Status / archives / 000470.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" id="sixapart-standard">
4 <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6    <meta name="generator" content="Movable Type 5.2.3" />
7
8    <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles-site.css" type="text/css" />
9    <link rel="alternate" type="application/atom+xml" title="Atom" href="http://defaria.com/blogs/Status/atom.xml" />
10    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://defaria.com/blogs/Status/index.xml" />
11
12    <title>Status for Andrew DeFaria: check_attachments</title>
13
14    <link rel="start" href="http://defaria.com/blogs/Status/" title="Home" />
15    <link rel="prev" href="http://defaria.com/blogs/Status/archives/000467.html" title="bin_merge" />
16    <link rel="next" href="http://defaria.com/blogs/Status/archives/000471.html" title="More on attachments" />
17
18    
19
20    
21
22    <script type="text/javascript" src="http://defaria.com/blogs/Status/mt-site.js"></script>
23 </head>
24 <body class="layout-one-column" onload="individualArchivesOnLoad(commenter_name)">
25    <div id="container">
26       <div id="container-inner" class="pkg">
27
28          <div id="banner">
29             <div id="banner-inner" class="pkg">
30                <h1 id="banner-header"><a href="http://defaria.com/blogs/Status/" accesskey="1">Status for Andrew DeFaria</a></h1>
31                <h2 id="banner-description">Searchable status reports and work log</h2>
32             </div>
33          </div>
34
35          <div id="pagebody">
36             <div id="pagebody-inner" class="pkg">
37                <div id="alpha">
38                   <div id="alpha-inner" class="pkg">
39
40                      <p class="content-nav">
41                         <a href="http://defaria.com/blogs/Status/archives/000467.html">&laquo; bin_merge</a> |
42                         <a href="http://defaria.com/blogs/Status/">Main</a>
43                         | <a href="http://defaria.com/blogs/Status/archives/000471.html">More on attachments &raquo;</a>
44                      </p>
45
46                      <a id="a000470"></a>
47                      <div class="entry" id="entry-470">
48                         <h3 class="entry-header">check_attachments</h3>
49                         <div class="entry-content">
50                            <div class="entry-body">
51                               <ul>
52   <li>Worked out a plan for how to perform the PQA Merge this weekend</li>
53
54   <li>Concerned about the size discrepancy in the database I wrote a little utility, check_attachments, to total up the size of all attachments in all the databases. This turned up a bug in pqamerge which I fixed. Reperforming pqamerge</li>
55
56   <li>There is a problem with using clearprompt to prompt for list input for bin_merge - You can only have one line of prompting text and only 50 characters in that line. It's gonna be hard to describe a binary merge situation in 50 characters or less. Investigated making a PerlTk list dialog. In theory it can be done as ccperl does support PerlTk.</li>
57
58   <li>Discussed with Naga the <i>email link</i> issue with PQA</li>
59 </ul>
60                            </div>
61                            <div id="more" class="entry-more">
62                               <h3>TransferAttachments</h3>
63
64 <p>I knew there was a good reason why this was eating at me. There is indeed a bug. My attachments transfer routine was not getting called at all for Prod! I wrote a small Perl script to check this and it yielded:<p>
65
66 <div class="code"><pre>
67 $ cqperl check_attachments
68 Totaling attachments in TO...
69 Totaling</span> attachments in Prod...
70 Totaling</span> attachments in Cont...
71 Total attachment size for TO = 272253137
72 Total attachment size for Prod = 2683569547
73 Total attachment size for Cont = 272253137
74 </pre></div>
75
76 <p>Notice that the size of the attachments for TO matches the size of attachments for Cont! IOW no Prod attachments got transferred at all!</p>
77
78 <p>Turns out I was only calling TransferAttachments when the field name was AttachmentsBRCM (and TransferAttachments then did all the attachments - both Attachments and AttachmentsBRCM). However, in Prod the field is named AttachmentBRCM - note the
79 singularity here! I tell ya my eyes are going.</p>
80
81 <p>I'm changing my code not be dependent on the field name and to just call TransferAttachments for each record. TransferAttachments doesn't need to know the field name - it just does all of them.</p>
82
83 <p>Unfortunately this means that I have to delete all of the records currently in the Cont database on p4test. And it also means that the approximate 4 hour running time will probably increase. However this does explain the discrepancy in the database sizes.</p>
84
85 <h3>Out of Disk Space</h3>
86
87 Shivdutt Jha wrote:
88 <blockquote type=cite>
89 Good job Andrew, another mystery is solved.
90 </blockquote>
91
92 <p>What is more telling is that we have 2.6 Gig of attachments!</p>
93
94 <p>In any event my merge failed with out of disk space. The pqamerge script uses the current directory to temporarily hold the attachments as the are transfered from one DB to the other. Turns out that Prod00010818 has two very large attachments, one 328485466 bytes and another 219095209 bytes. Unfortunately I was running in ~vobadm/My Documents and that disk filled. So another lesson learned - run pqamerge in a directory on a disk with lots of disk space! Alas this means I have to start this process over again (I'm trying to get a clean run and a timing of how long to expect the merge to run. pqamerge outputs how long it takes to do it work).</p>
95                            </div>
96                         </div>
97                         <p class="entry-footer">
98                            <span class="post-footers">Posted by  on November  7, 2005  6:54 PM</span> <span class="separator">|</span> <a class="permalink" href="http://defaria.com/blogs/Status/archives/000470.html">Permalink</a>
99                         </p>
100                      </div>
101
102                      
103
104                      
105                   </div>
106                </div>
107             </div>
108          </div>
109       </div>
110    </div>
111 </body>
112 </html>