what does rebase -i do if nothing has changed? - git-rebase

I noticed that if i do a
git rebase -i HEAD~10
and then don't change anything in the resulting file, some sort of rebase still gets performed. I.e. I need to
git push origin branch --force
since a regular push
git push origin branch
would apparently lose history!
This seems to imply that some history was changed but i don't understand why. If i didn't choose to change any commit (i.e. every commit was picked) then why did the history change and what specifically changed?

If you do a git log --format=fuller you'll see that a commit not only tracks the author, but the committer:
commit 0d987988ffed315ef63f79b33eae40a8715390c9
Author: Statichippo <example#example.com>
AuthorDate: Fri Jun 22 14:09:48 2012 -0400
Commit: Statichippo <example#example.com>
CommitDate: Fri Jun 22 14:09:48 2012 -0400
a commit message
When you rebase, your user is listed as the new committer. Here's an example of what it would look like if I rebased that code block:
commit 3e23bea3c778c66h59c5f665061e9354507b379b
Author: Statichippo <example#example.com>
AuthorDate: Fri Jun 22 14:09:48 2012 -0400
Commit: Jacob Angel <jangel#example.com>
CommitDate: Tue Jul 3 12:39:43 2012 -0400
a commit message
So what's probably happening is that you're rebasing commits that were made by another person, and it's changing the commit and CommitDate. Obviously git will see a new hash (because part of the commit's changed) and note the change.

Related

GitHub Issues: Closed date is before created date. How is it possible?

I've noticed some issues were closed before they were created. Is this possible in some scenarios? If not, what kind of error can cause this?
Examples:
https://github.com/Jackett/Jackett/issues/10042 Created: 1 Nov 2020 12.44 Closed: 1 Nov 2020 12.16 GMT+3
https://github.com/owncloud/core/issues/5677
https://github.com/spring-projects/spring-framework/issues/22240

CPAN installation prompting "waiting for read lock"

I just installed perl and am trying to install CPAN without root privilege.
As I run cpan App::cpanminus, I got into an infinite loop echoing Waiting for read lock on '~/.cpan/FTPstats.yml'. I tried removing the file and the error persists.
Highly appreciate any solution and thanks in advance!
A snapshot of full log is as follows.
Loading internal null logger. Install Log::Log4perl for logging messages
Reading '/home/louis/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Reading '/home/louis/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Tue, 01 Mar 2022 04:17:03 GMT
.............
New CPAN.pm version (v2.29) available.
[Currently running version is v2.16]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
...............................................................DONE
Fetching with LWP:
http://www.cpan.org/modules/03modlist.data.gz
Tue Mar 1 13:33:09 2022: waiting for read lock on '/home/louis/.cpan/FTPstats.yml' (since Tue Mar 1 13:32:59 2022)
Tue Mar 1 13:33:12 2022: waiting for read lock on '/home/louis/.cpan/FTPstats.yml' (since Tue Mar 1 13:32:59 2022)
And some details of access right of FTPstats.yml.
-rw-r--r-- 1 louis louis 0 Mar 1 13:32 /home/louis/.cpan/FTPstats.yml

rpmlint: "W: no-version-in-last-changelog"

When building RPMs in SLES12, I use rpmlint to check the spec files and packages.
I always get the warning W: no-version-in-last-changelog, but I cannot explain it:
The last lines of my %changelog reads like
* Tue Jul 11 2011 My Self <my.email#address.here>
- Release 5.2.5-0.0: Initial release.
So I guess that's the "last" changelog the warning refers to, and there's clearly a version in it.
Even if it would refer to the first (latest) version, it wouldn't make a difference, as it looks very much the same:
%changelog
* Thu Apr 8 2021 My Self <my.email#address.here>
- Release 5.28.0-0.0: Updated to...
more text.
* Thu Jul 5 2018 ...next entry using just the same format...
If we take a look at OpenSUSE RPM packaging guidelines on creating the changes file... https://en.opensuse.org/openSUSE:Creating_a_changes_file_(RPM)
They suggest using the following format...
Tue Apr 22 20:54:26 UTC 2013 - your#email.com - x.y.z
- Update to new upstream release x.y.z:
* bling and changes from upstream for that version
* just the relevant parts, no info about other OS
* and keep it as short as possible
So I think it's complaining because you ought to use format which looks something like this...
* Tue Jul 11 2011 My Self <my.email#address.here> - 5.2.5-0.0
- Initial release.
I'm pretty sure that you could also use the following if it's important to have the version number on the first line of the changes.
* Tue Jul 11 2011 My Self <my.email#address.here>
- 5.2.5-0.0
- Initial release.

getting timeout error during commiting large files on svn

We are using SVN with ubuntu 14.04 and eclipse subversion and apache. It works fine when we commit small files. But when we try to commit large file, it gives following error.
eclipse error:
Some of selected resources were not committed.
Some of selected resources were not committed.
svn: E175002: Commit failed (details follow):
svn: E175002: Commit failed (details follow):
svn: E175002: can not read HTTP status line
svn: E175002: PUT request failed on '/svn/test/!svn/wrk/953b88fa-5601-0010-8146-c3b0661fb4b6/trunk/*/TokenManagerImpl.java'
apache error.log
[Mon Sep 05 19:12:18.533736 2016] [dav:error] [pid 26083:tid 140002512074496] (70007)The timeout specified has expired: [client 182.75.153.50:56725] Timeout reading the body (URI: /svn/test/!svn/wrk/953b88fa-5601-0010-8146-c3b0661fb4b6/trunk/*/TokenManagerImpl.java) [408, #0]
[Mon Sep 05 19:12:18.533851 2016] [dav:error] [pid 26083:tid 140002512074496] [client 182.75.153.50:56725] mod_dav_svn close_stream: error closing write stream [500, #185004]
[Mon Sep 05 19:12:18.533876 2016] [dav:error] [pid 26083:tid 140002512074496] [client 182.75.153.50:56725] Unexpected end of svndiff input [500, #185004]
Below is apche timeout configuration (apache.conf)
Timeout 300
KeepAlive On
MaxKeepAliveRequests 250
KeepAliveTimeout 20
LimitRequestBody 0
Below is reqtimeout.conf
<IfModule reqtimeout_module>
RequestReadTimeout header=200-400,minrate=5000
RequestReadTimeout body=1000,minrate=5000
</IfModule>
It seems that invalid RequestReadTimeout configuration is the root cause. You should not put a special timeout for body.
Apache Subversion transfers commit data as request body and it's size depends on the size of commit. Therefore, with the config you currently have, all commit operations that take more than ~1000 seconds will fail for your users.
Just in case someone else ends up here with:
svn commit via http
Large binary file ~80MB.
Transmitting file data .
svn: E185004: Commit failed (details follow):
svn: E185004: Unexpected end of svndiff input
Change the apache2 reqtimeout.conf file for the header as well.
(The symptom is the svn commit will croak after 40 seconds...)
RequestReadTimeout header=200-400,minrate=500
Fixed it for me. "Your mileage may vary..."

MongoDB SECONDARY becoming RECOVERING at nighttime

I am running a conventional MongoDB Replica Set consisting of 3 members (member1 in datacenter A, member2 and member3 in datacenter B).
member1 is the current PRIMARY and I am adding members 2 and 3 via rs.add(). They are performing their initial sync and become SECONDARY very soon. Everything is fine all day long and the replication delay of both members is 0 seconds until 2 AM at nighttime.
Now: Every night at 2 AM both members shift into the RECOVERING state and stop replication at all, which leads to a replication delay of hours when I am having a look into rs.printSlaveReplicationInfo() in the morning hours. At around 2 AM there are no massive inserts or maintenance tasks known to me.
I get the following log entries on the PRIMARY:
2015-10-09T01:59:38.914+0200 [initandlisten] connection accepted from 192.168.227.209:59905 #11954 (37 connections now open)
2015-10-09T01:59:55.751+0200 [conn11111] warning: Collection dropped or state deleted during yield of CollectionScan
2015-10-09T01:59:55.869+0200 [conn11111] warning: Collection dropped or state deleted during yield of CollectionScan
2015-10-09T01:59:55.870+0200 [conn11111] getmore local.oplog.rs cursorid:1155433944036 ntoreturn:0 keyUpdates:0 numYields:1 locks(micros) r:32168 nreturned:0 reslen:20 134ms
2015-10-09T01:59:55.872+0200 [conn11111] end connection 192.168.227.209:58972 (36 connections now open)
And, which is more interesting, I get the following log entries on both SECONDARYs:
2015-10-09T01:59:55.873+0200 [rsBackgroundSync] repl: old cursor isDead, will initiate a new one
2015-10-09T01:59:55.873+0200 [rsBackgroundSync] replSet syncing to: member1:27017
2015-10-09T01:59:56.065+0200 [rsBackgroundSync] replSet error RS102 too stale to catch up, at least from member1:27017
2015-10-09T01:59:56.066+0200 [rsBackgroundSync] replSet our last optime : Oct 9 01:59:23 5617035b:17f
2015-10-09T01:59:56.066+0200 [rsBackgroundSync] replSet oldest at member1:27017 : Oct 9 01:59:23 5617035b:1af
2015-10-09T01:59:56.066+0200 [rsBackgroundSync] replSet See http://dochub.mongodb.org/core/resyncingaverystalereplicasetmember
2015-10-09T01:59:56.066+0200 [rsBackgroundSync] replSet error RS102 too stale to catch up
2015-10-09T01:59:56.066+0200 [rsBackgroundSync] replSet RECOVERING
Which is also striking - the start of the oplog "resets" itself every night at around 2 AM:
configured oplog size: 990MB
log length start to end: 19485secs (5.41hrs)
oplog first event time: Fri Oct 09 2015 02:00:33 GMT+0200 (CEST)
oplog last event time: Fri Oct 09 2015 07:25:18 GMT+0200 (CEST)
now: Fri Oct 09 2015 07:25:26 GMT+0200 (CEST)
I am not sure if this is somehow correlated to the issue. I am also wondering that such a small delay (Oct 9 01:59:23 5617035b:17f <-> Oct 9 01:59:23 5617035b:1af) lets the members become stale.
Could this also be a server (VM host) time issue or is it something completely different? (Why is the first oplog event being "resetted" every night and not "shifting" to a timestamp like NOW minus 24 hrs?)
What can I do to investigate and to avoid?
Upping the oplog size should solve this (per our comments).
Some references for others who run into this issue
Workloads that Might Require a Larger Oplog Size
Error: replSet error RS102 too stale to catch up link1 & link2